summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_fork.c
diff options
context:
space:
mode:
authorart <art@openbsd.org>2002-01-25 15:00:26 +0000
committerart <art@openbsd.org>2002-01-25 15:00:26 +0000
commitc19e3eec4def0ca9688446ce089785dec8855154 (patch)
tree32afe609bc5c848c02768c44b4344e6bf8a9b0db /sys/kern/kern_fork.c
parentConvert plimit allocations to pool. (diff)
downloadwireguard-openbsd-c19e3eec4def0ca9688446ce089785dec8855154.tar.xz
wireguard-openbsd-c19e3eec4def0ca9688446ce089785dec8855154.zip
poolify pcreds.
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r--sys/kern/kern_fork.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 57b1c939195..9398e868227 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_fork.c,v 1.48 2002/01/16 20:50:17 miod Exp $ */
+/* $OpenBSD: kern_fork.c,v 1.49 2002/01/25 15:00:26 art Exp $ */
/* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */
/*
@@ -272,8 +272,7 @@ again:
if (p1->p_flag & P_PROFIL)
startprofclock(p2);
p2->p_flag |= (p1->p_flag & (P_SUGID | P_SUGIDEXEC));
- MALLOC(p2->p_cred, struct pcred *, sizeof(struct pcred),
- M_SUBPROC, M_WAITOK);
+ p2->p_cred = pool_get(&pcred_pool, PR_WAITOK);
bcopy(p1->p_cred, p2->p_cred, sizeof(*p2->p_cred));
p2->p_cred->p_refcnt = 1;
crhold(p1->p_ucred);