mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Fix memory leaks for jobs.
Free the data memory of process and pipe handles in the close callback for a job.
This commit is contained in:
parent
bb1f08f6e8
commit
e9e4cdb3d4
@ -402,6 +402,14 @@ static void close_cb(uv_handle_t *handle)
|
||||
rstream_free(job->out);
|
||||
rstream_free(job->err);
|
||||
wstream_free(job->in);
|
||||
|
||||
// Free data memory of process and pipe handles, that was allocated
|
||||
// by handle_set_job in job_start.
|
||||
free(job->proc.data);
|
||||
free(job->proc_stdin.data);
|
||||
free(job->proc_stdout.data);
|
||||
free(job->proc_stderr.data);
|
||||
|
||||
shell_free_argv(job->proc_opts.args);
|
||||
free(job);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user