summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/uipc_socket.c')
-rw-r--r--sys/kern/uipc_socket.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index 65ef837..a7ac484 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -160,8 +160,7 @@ socreate(dom, aso, type, proto, td)
TAILQ_INIT(&so->so_incomp);
TAILQ_INIT(&so->so_comp);
so->so_type = type;
- so->so_cred = td->td_proc->p_ucred;
- crhold(so->so_cred);
+ so->so_cred = crhold(td->td_proc->p_ucred);
so->so_proto = prp;
error = (*prp->pr_usrreqs->pru_attach)(so, proto, td);
if (error) {
OpenPOWER on IntegriCloud