Plug small memory leak in run-shell

Don't potentially leak the command to run were it to fail.
pull/1/head
Thomas Adam 2013-02-25 07:33:21 +00:00
parent b2a61348dd
commit 2ccb67cae4
1 changed files with 1 additions and 0 deletions

View File

@ -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);