diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-01-09 01:42:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-09 01:42:58 +0100 |
commit | 94101987a57014e57ed811ab37061e59b42287d9 (patch) | |
tree | cf987a9359879cb262770b237c53cdddd249575b /src | |
parent | 1420e1047454fad3b3cd50592f284c581a7e33d7 (diff) | |
download | rneovim-94101987a57014e57ed811ab37061e59b42287d9.tar.gz rneovim-94101987a57014e57ed811ab37061e59b42287d9.tar.bz2 rneovim-94101987a57014e57ed811ab37061e59b42287d9.zip |
process_wait(): Avoid dereference after LOOP_PROCESS_EVENTS. (#5917)
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/event/process.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/event/process.c b/src/nvim/event/process.c index 39dd5fd55a..dc7886469b 100644 --- a/src/nvim/event/process.c +++ b/src/nvim/event/process.c @@ -170,8 +170,9 @@ int process_wait(Process *proc, int ms, MultiQueue *events) int status = -1; bool interrupted = false; if (!proc->refcount) { + status = proc->status; LOOP_PROCESS_EVENTS(proc->loop, proc->events, 0); - return proc->status; + return status; } if (!events) { |