From: Nick Porter Date: Fri, 6 Jan 2023 11:16:03 +0000 (+0000) Subject: Only cleanup child processes if the exec has been populated X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe6214a79abe51d9fd0d8fc9a59678cdd9881246;p=thirdparty%2Ffreeradius-server.git Only cleanup child processes if the exec has been populated --- diff --git a/src/lib/unlang/tmpl.c b/src/lib/unlang/tmpl.c index 57dc99c5640..d508008b15d 100644 --- a/src/lib/unlang/tmpl.c +++ b/src/lib/unlang/tmpl.c @@ -55,7 +55,7 @@ static void unlang_tmpl_signal(request_t *request, unlang_stack_frame_t *frame, /* * If we're cancelled, then kill any child processes */ - if (action == FR_SIGNAL_CANCEL) fr_exec_cleanup(&state->exec, SIGKILL); + if ((action == FR_SIGNAL_CANCEL) && state->exec.request) fr_exec_cleanup(&state->exec, SIGKILL); if (!state->signal) return;