From: Arran Cudbard-Bell Date: Fri, 19 Mar 2021 21:00:45 +0000 (+0000) Subject: Fix bad logic, and don't free the subrequests X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a7b60193df24d3bfa7480ef86fafd19019904966;p=thirdparty%2Ffreeradius-server.git Fix bad logic, and don't free the subrequests --- diff --git a/src/lib/unlang/interpret_synchronous.c b/src/lib/unlang/interpret_synchronous.c index f940522bffc..45859b09283 100644 --- a/src/lib/unlang/interpret_synchronous.c +++ b/src/lib/unlang/interpret_synchronous.c @@ -51,8 +51,7 @@ static void _request_internal_init(request_t *request, void *uctx) */ static void _request_internal_done(request_t *request, UNUSED rlm_rcode_t rcode, UNUSED void *uctx) { - RDEBUG3("Freeing synchronous request"); - talloc_free(request); + RDEBUG3("Done synchronous request"); } /** External request is now complete @@ -172,7 +171,7 @@ rlm_rcode_t unlang_interpret_synchronous(request_t *request) rcode = unlang_interpret(request); - while (!(dont_wait_for_event = (fr_heap_num_elements(intps->runnable) == 0)) || + while ((dont_wait_for_event = (fr_heap_num_elements(intps->runnable) > 0)) || (intps->yielded > 0)) { rlm_rcode_t sub_rcode; int num_events; @@ -230,9 +229,6 @@ rlm_rcode_t unlang_interpret_synchronous(request_t *request) if (sub_request == request) { rcode = sub_rcode; - } else { - RDEBUG4("Cleaning up subrequest"); - talloc_free(sub_request); } }