From: Alan T. DeKok Date: Mon, 14 Nov 2022 21:39:51 +0000 (-0500) Subject: thread_instantiate may be NULL X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afebe9cb92d8b69e527889aa1bad237b033d22e9;p=thirdparty%2Ffreeradius-server.git thread_instantiate may be NULL but we may still have thread instance data, which is just counters --- diff --git a/src/lib/unlang/compile.c b/src/lib/unlang/compile.c index 246d29a88a7..134d1256c6a 100644 --- a/src/lib/unlang/compile.c +++ b/src/lib/unlang/compile.c @@ -4569,7 +4569,6 @@ int unlang_thread_instantiate(TALLOC_CTX *ctx) unlang_thread_array[instruction->number].instruction = instruction; op = &unlang_ops[instruction->type]; - if (!op->thread_instantiate) continue; /* * Allocate any thread-specific instance data. @@ -4579,7 +4578,7 @@ int unlang_thread_instantiate(TALLOC_CTX *ctx) talloc_set_name_const(unlang_thread_array[instruction->number].thread_inst, op->thread_inst_type); } - if (op->thread_instantiate(instruction, unlang_thread_array[instruction->number].thread_inst) < 0) { + if (op->thread_instantiate && (op->thread_instantiate(instruction, unlang_thread_array[instruction->number].thread_inst) < 0)) { return -1; } }