mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
job: Fix memory error
Fix pointer passed to the handles in the uv_close() calls when process_spawn() fails.
This commit is contained in:
parent
a6fb511c7f
commit
56ef37eb59
@ -142,13 +142,13 @@ Job *job_start(JobOptions opts, int *status)
|
|||||||
// Spawn the job
|
// Spawn the job
|
||||||
if (!process_spawn(job)) {
|
if (!process_spawn(job)) {
|
||||||
if (opts.writable) {
|
if (opts.writable) {
|
||||||
uv_close((uv_handle_t *)&job->proc_stdin, close_cb);
|
uv_close((uv_handle_t *)job->proc_stdin, close_cb);
|
||||||
}
|
}
|
||||||
if (opts.stdout_cb) {
|
if (opts.stdout_cb) {
|
||||||
uv_close((uv_handle_t *)&job->proc_stdout, close_cb);
|
uv_close((uv_handle_t *)job->proc_stdout, close_cb);
|
||||||
}
|
}
|
||||||
if (opts.stderr_cb) {
|
if (opts.stderr_cb) {
|
||||||
uv_close((uv_handle_t *)&job->proc_stderr, close_cb);
|
uv_close((uv_handle_t *)job->proc_stderr, close_cb);
|
||||||
}
|
}
|
||||||
process_close(job);
|
process_close(job);
|
||||||
event_poll(0);
|
event_poll(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user