]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
No need to get thread data if there is a forced return code
authorNick Porter <nick@portercomputing.co.uk>
Tue, 28 Feb 2023 15:37:57 +0000 (15:37 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Fri, 10 Mar 2023 17:18:36 +0000 (17:18 +0000)
src/lib/unlang/module.c

index 6822616d940672c142a508a5a942cd3fa85b4820..f8e2c94f6967c021ab579a33d5eefff9fb600d0f 100644 (file)
@@ -896,12 +896,7 @@ static unlang_action_t unlang_module(rlm_rcode_t *p_result, request_t *request,
        RDEBUG4("[%i] %s - %s (%s)", stack_depth_current(request), __FUNCTION__,
                mc->instance->name, mc->instance->module->name);
 
-       /*
-        *      Grab the thread/module specific data if any exists.
-        */
-       state->thread = module_thread(mc->instance);
        state->p_result = NULL;
-       fr_assert(state->thread != NULL);
 
        /*
         *      Return administratively configured return code
@@ -912,6 +907,12 @@ static unlang_action_t unlang_module(rlm_rcode_t *p_result, request_t *request,
                goto done;
        }
 
+       /*
+        *      Grab the thread/module specific data if any exists.
+        */
+       state->thread = module_thread(mc->instance);
+       fr_assert(state->thread != NULL);
+
        /*
         *      Don't allow returning _through_ modules
         */