summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r--sys/kern/kern_exit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 71e6288..24a4753 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -521,8 +521,10 @@ loop:
*/
PROC_LOCK(p);
if (--p->p_cred->p_refcnt == 0) {
+ PROC_UNLOCK(p);
crfree(p->p_ucred);
uifree(p->p_cred->p_uidinfo);
+ PROC_LOCK(p);
FREE(p->p_cred, M_SUBPROC);
p->p_cred = NULL;
}
OpenPOWER on IntegriCloud