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.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 1af27d2..6454d11 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -516,7 +516,7 @@ loop:
/*
* Decrement the count of procs running with this uid.
*/
- (void)chgproccnt(p->p_cred->p_uidinfo, -1, 0);
+ (void)chgproccnt(p->p_ucred->cr_ruidinfo, -1, 0);
/*
* Release reference to text vnode
@@ -541,12 +541,8 @@ loop:
/*
* Free up credentials.
*/
- if (--p->p_cred->p_refcnt == 0) {
- crfree(p->p_ucred);
- uifree(p->p_cred->p_uidinfo);
- FREE(p->p_cred, M_SUBPROC);
- p->p_cred = NULL;
- }
+ crfree(p->p_ucred);
+ p->p_ucred = NULL;
/*
* Remove unused arguments
OpenPOWER on IntegriCloud