mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 23:18:21 +00:00
syscalls: waitpid: fix possible null pointer dereference
This commit is contained in:
@@ -93,7 +93,8 @@ syscallret syscall_waitpid(pid_t pid, int *status, int options){
|
|||||||
proc->child = child->sibling;
|
proc->child = child->sibling;
|
||||||
}
|
}
|
||||||
|
|
||||||
*status = child->status; // XXX safer way of doing this
|
if(status)
|
||||||
|
*status = child->status; // XXX safer way of doing this
|
||||||
|
|
||||||
// the pointer to the last remaining thread is is proc->threads
|
// the pointer to the last remaining thread is is proc->threads
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user