Fix up panics when fork fails due to hitting proc limit
The function clearning credentials on failure asserts the process is a zombie, which is not true when fork fails. Changing creds to NULL is unnecessary, but is still being done for consistency with other code. Pointy hat: mjg Reported by: pho
This commit is contained in:
parent
0631de4a79
commit
edf1796d3e
@ -943,7 +943,8 @@ fail:
|
||||
#endif
|
||||
racct_proc_exit(newproc);
|
||||
fail1:
|
||||
crfree(proc_set_cred(newproc, NULL));
|
||||
crfree(newproc->p_ucred);
|
||||
newproc->p_ucred = NULL;
|
||||
fail2:
|
||||
if (vm2 != NULL)
|
||||
vmspace_free(vm2);
|
||||
|
Loading…
x
Reference in New Issue
Block a user