mirror of
https://github.com/tmate-io/tmate.git
synced 2025-02-17 10:50:51 +01:00
Plug small memory leak in run-shell
Don't potentially leak the command to run were it to fail.
This commit is contained in:
parent
b2a61348dd
commit
2ccb67cae4
@ -101,6 +101,7 @@ cmd_run_shell_exec(struct cmd *self, struct cmd_q *cmdq)
|
|||||||
cmdq->references++;
|
cmdq->references++;
|
||||||
|
|
||||||
job_run(shellcmd, cmd_run_shell_callback, cmd_run_shell_free, cdata);
|
job_run(shellcmd, cmd_run_shell_callback, cmd_run_shell_free, cdata);
|
||||||
|
free(shellcmd);
|
||||||
|
|
||||||
if (cdata->bflag)
|
if (cdata->bflag)
|
||||||
return (CMD_RETURN_NORMAL);
|
return (CMD_RETURN_NORMAL);
|
||||||
|
Loading…
Reference in New Issue
Block a user