syscalls: waitpid: fix possible null pointer dereference

This commit is contained in:
Matheus
2022-10-26 21:43:46 -03:00
parent e904c89104
commit 1d28e68aa2
+1
View File
@@ -93,6 +93,7 @@ syscallret syscall_waitpid(pid_t pid, int *status, int options){
proc->child = child->sibling; proc->child = child->sibling;
} }
if(status)
*status = child->status; // XXX safer way of doing this *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