From: Nick Porter Date: Tue, 28 Feb 2023 15:37:57 +0000 (+0000) Subject: No need to get thread data if there is a forced return code X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2b1ec8e158c227972af757fb502ba0ba03b433a;p=thirdparty%2Ffreeradius-server.git No need to get thread data if there is a forced return code --- diff --git a/src/lib/unlang/module.c b/src/lib/unlang/module.c index 6822616d940..f8e2c94f696 100644 --- a/src/lib/unlang/module.c +++ b/src/lib/unlang/module.c @@ -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 */