mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 13:37:12 +00:00
Memory leaks, from Gang Fan in GitHub issue 1453.
This commit is contained in:
@ -102,8 +102,12 @@ cmd_run_shell_exec(struct cmd *self, struct cmdq_item *item)
|
||||
if (!args_has(args, 'b'))
|
||||
cdata->item = item;
|
||||
|
||||
job_run(cdata->cmd, s, server_client_get_cwd(item->client, s), NULL,
|
||||
cmd_run_shell_callback, cmd_run_shell_free, cdata, 0);
|
||||
if (job_run(cdata->cmd, s, server_client_get_cwd(item->client, s), NULL,
|
||||
cmd_run_shell_callback, cmd_run_shell_free, cdata, 0) == NULL) {
|
||||
cmdq_error(item, "failed to run command: %s", cdata->cmd);
|
||||
free(cdata);
|
||||
return (CMD_RETURN_ERROR);
|
||||
}
|
||||
|
||||
if (args_has(args, 'b'))
|
||||
return (CMD_RETURN_NORMAL);
|
||||
|
Reference in New Issue
Block a user