]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Only cleanup child processes if the exec has been populated
authorNick Porter <nick@portercomputing.co.uk>
Fri, 6 Jan 2023 11:16:03 +0000 (11:16 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Fri, 6 Jan 2023 11:16:03 +0000 (11:16 +0000)
src/lib/unlang/tmpl.c

index 57dc99c5640e155304edcaebcbb9c4ae11b5c57a..d508008b15dbb8be8e71b59c117f01541caed4c2 100644 (file)
@@ -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;