mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 15:08:21 +00:00
syscalls: waitpid: fix possible null pointer dereference
This commit is contained in:
@@ -92,8 +92,9 @@ syscallret syscall_waitpid(pid_t pid, int *status, int options){
|
|||||||
else{
|
else{
|
||||||
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