From dff1bf6f0f5521cf9e23e2b32a648512e13b6a72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 3 May 2020 16:33:02 +0200 Subject: [PATCH] exec: return NULL immediately if the task id is invalid --- src/plugins/exec/exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/exec/exec.c b/src/plugins/exec/exec.c index b6312f472..44544628d 100644 --- a/src/plugins/exec/exec.c +++ b/src/plugins/exec/exec.c @@ -89,7 +89,7 @@ exec_search_by_id (const char *id) error = NULL; number = strtol (id, &error, 10); if (!error || error[0]) - number = -1; + return NULL; for (ptr_exec_cmd = exec_cmds; ptr_exec_cmd; ptr_exec_cmd = ptr_exec_cmd->next_cmd)