mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 16:58:17 +00:00
eval.c: Fix memory leak for detached pty job
This commit is contained in:
@@ -21765,6 +21765,9 @@ static inline bool common_job_start(TerminalJobData *data, typval_T *rettv)
|
|||||||
Process *proc = (Process *)&data->proc;
|
Process *proc = (Process *)&data->proc;
|
||||||
if (proc->type == kProcessTypePty && proc->detach) {
|
if (proc->type == kProcessTypePty && proc->detach) {
|
||||||
EMSG2(_(e_invarg2), "terminal/pty job cannot be detached");
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user