summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2006-10-31 16:24:56 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2006-10-31 16:24:56 +0000
commit71837f57e11215f447e7080e4aee9b8d6c8a8b72 (patch)
treef6231471f8a606015a8736c96d456f7af11c396b /sys
parent32a1a4de8dc340da1e1962d0ae33528c15104d7f (diff)
undo unp_internalize in case of errors; report Christian Biere; ok claudio
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/uipc_usrreq.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index 1e044d18212..06dca0d58f1 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_usrreq.c,v 1.31 2006/02/27 23:38:11 miod Exp $ */
+/* $OpenBSD: uipc_usrreq.c,v 1.32 2006/10/31 16:24:55 markus Exp $ */
/* $NetBSD: uipc_usrreq.c,v 1.18 1996/02/09 19:00:50 christos Exp $ */
/*
@@ -240,6 +240,9 @@ uipc_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam,
default:
panic("uipc 4");
}
+ /* we need to undo unp_internalize in case of errors */
+ if (control && error)
+ unp_dispose(control);
break;
case PRU_ABORT: