process_wait(): Avoid dereference after LOOP_PROCESS_EVENTS. (#5917)

This commit is contained in:
Justin M. Keyes 2017-01-09 01:42:58 +01:00 committed by GitHub
parent 1420e10474
commit 94101987a5

View File

@ -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) {