From: Alan T. DeKok Date: Thu, 19 Oct 2017 14:57:24 +0000 (-0400) Subject: remove "runnable" requests from the runnable queue X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f7ff53a363dedce4fd889286976a96a2cd1e378;p=thirdparty%2Ffreeradius-server.git remove "runnable" requests from the runnable queue --- diff --git a/src/main/unlang_interpret.c b/src/main/unlang_interpret.c index 68386180230..e79114cfcaf 100644 --- a/src/main/unlang_interpret.c +++ b/src/main/unlang_interpret.c @@ -1121,13 +1121,21 @@ static rlm_rcode_t unlang_parallel_run(REQUEST *request, unlang_parallel_t *stat * return, no one can access their data any more. */ for (i = 0; i < state->num_children; i++) { - if ((state->children[i].state == CHILD_YIELDED) || - (state->children[i].state == CHILD_RUNNABLE)) { + switch (state->children[i].state) { + case CHILD_RUNNABLE: + (void) fr_heap_extract(state->children[i].child->backlog, + state->children[i].child); + /* FALL-THROUGH */ + + case CHILD_YIELDED: TALLOC_FREE(state->children[i].child); - } + /* FALL-THROUGH */ - state->children[i].state = CHILD_DONE; - state->children[i].instruction = NULL; + default: + state->children[i].state = CHILD_DONE; + state->children[i].instruction = NULL; + break; + } } /*