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
b57811b371
commit
8ff4e1f8c8
|
@ -493,7 +493,10 @@ namespace Kernel
|
|||
return BAN::Error::from_errno(ECHILD);
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue