From 2ccb67cae4eafa0f86d95317186719d1bfd09d57 Mon Sep 17 00:00:00 2001 From: Thomas Adam Date: Mon, 25 Feb 2013 07:33:21 +0000 Subject: [PATCH] Plug small memory leak in run-shell Don't potentially leak the command to run were it to fail. --- cmd-run-shell.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd-run-shell.c b/cmd-run-shell.c index aaa310b9..f805c7ae 100644 --- a/cmd-run-shell.c +++ b/cmd-run-shell.c @@ -101,6 +101,7 @@ cmd_run_shell_exec(struct cmd *self, struct cmd_q *cmdq) cmdq->references++; job_run(shellcmd, cmd_run_shell_callback, cmd_run_shell_free, cdata); + free(shellcmd); if (cdata->bflag) return (CMD_RETURN_NORMAL);