]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Ephemeral xlats do not rely on xlat thread instance data
authorNick Porter <nick@portercomputing.co.uk>
Tue, 29 Nov 2022 10:29:31 +0000 (10:29 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Tue, 29 Nov 2022 12:23:22 +0000 (12:23 +0000)
src/lib/unlang/xlat_inst.c

index d44cd4208c73db8b62eee20eb0893326855030ae..b8475027b0677a72c799081899e499cad35d2e8b 100644 (file)
@@ -362,12 +362,12 @@ xlat_thread_inst_t *xlat_thread_instance_find(xlat_exp_t const *node)
        xlat_call_t const *call = &node->call;
        xlat_thread_inst_t *xt;
 
+       if (call->ephemeral) return call->thread_inst;
+
        fr_assert(xlat_thread_inst_tree);
        fr_assert(node->type == XLAT_FUNC);
        fr_assert(fr_heap_num_elements(xlat_thread_inst_tree) == fr_heap_num_elements(xlat_inst_tree));
 
-       if (call->ephemeral) return call->thread_inst;
-
        /*
         *      This works because the comparator for
         *      the thread heap returns the same result