mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
eval.c: Fix memory leak for detached pty job
This commit is contained in:
parent
1c9d7270a8
commit
f8a8a56908
@ -21765,6 +21765,9 @@ static inline bool common_job_start(TerminalJobData *data, typval_T *rettv)
|
||||
Process *proc = (Process *)&data->proc;
|
||||
if (proc->type == kProcessTypePty && proc->detach) {
|
||||
EMSG2(_(e_invarg2), "terminal/pty job cannot be detached");
|
||||
xfree(data->proc.pty.term_name);
|
||||
shell_free_argv(proc->argv);
|
||||
free_term_job_data_event((void **)&data);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user