From: Alan T. DeKok Date: Wed, 8 Nov 2017 16:56:28 +0000 (-0500) Subject: fail if there's no resume function X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=21af19fc30d71cc7fe4162df01076e8e5d002ce9;p=thirdparty%2Ffreeradius-server.git fail if there's no resume function --- diff --git a/src/main/unlang_interpret.c b/src/main/unlang_interpret.c index 51129b02716..a29e02f0dbf 100644 --- a/src/main/unlang_interpret.c +++ b/src/main/unlang_interpret.c @@ -1896,6 +1896,11 @@ static unlang_action_t unlang_resume(REQUEST *request, RDEBUG3("Resuming in %s", mr->self.debug_name); + if (!unlang_ops_resume[mr->parent_type]) { + *presult = RLM_MODULE_FAIL; + return UNLANG_ACTION_CALCULATE_RESULT; + } + memcpy(&instance, &mr->instance, sizeof(instance)); request->module = mr->self.debug_name; @@ -1904,10 +1909,8 @@ static unlang_action_t unlang_resume(REQUEST *request, * the original frame which was used to * create this resumption frame. */ - if (unlang_ops_resume[mr->parent_type]) { - *presult = request->rcode = unlang_ops_resume[mr->parent_type](request, instance, - mr->thread, mr->resume_ctx); - } + *presult = request->rcode = unlang_ops_resume[mr->parent_type](request, instance, + mr->thread, mr->resume_ctx); request->module = NULL;