forked from Bananymous/banan-os
Kernel: Don't write to stat_loc on SYS_WAIT if it is null
This commit is contained in:
parent
7a5bb6a56b
commit
9fc75fe445
|
@ -493,7 +493,10 @@ namespace Kernel
|
||||||
return BAN::Error::from_errno(ECHILD);
|
return BAN::Error::from_errno(ECHILD);
|
||||||
|
|
||||||
pid_t ret = target->pid();
|
pid_t ret = target->pid();
|
||||||
*stat_loc = target->block_until_exit();
|
|
||||||
|
int stat = target->block_until_exit();
|
||||||
|
if (stat_loc)
|
||||||
|
*stat_loc = stat;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue