summaryrefslogtreecommitdiff
path: root/sys/net/raw_usrreq.c
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2012-12-12 17:23:54 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2012-12-12 17:23:54 +0000
commitb43f219c1fdae172206d0c0e79a119b2a22d4d79 (patch)
treeb8e1662796587ee965517d05c0a58786bd160e3a /sys/net/raw_usrreq.c
parente45b06b839f3a4b340e3edde05e9124cbe249101 (diff)
Rearrange the code a bit to prevent splx() from being called with an
uninitialized variable. Found by Owain G. Ainsworth, ok guenther
Diffstat (limited to 'sys/net/raw_usrreq.c')
-rw-r--r--sys/net/raw_usrreq.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/raw_usrreq.c b/sys/net/raw_usrreq.c
index 0b65d2e7602..aeca02715f8 100644
--- a/sys/net/raw_usrreq.c
+++ b/sys/net/raw_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: raw_usrreq.c,v 1.15 2012/11/27 17:29:07 mikeb Exp $ */
+/* $OpenBSD: raw_usrreq.c,v 1.16 2012/12/12 17:23:53 mikeb Exp $ */
/* $NetBSD: raw_usrreq.c,v 1.11 1996/02/13 22:00:43 christos Exp $ */
/*
@@ -221,7 +221,7 @@ raw_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam,
#endif
case PRU_CONNECT2:
error = EOPNOTSUPP;
- goto release;
+ break;
case PRU_DISCONNECT:
if (rp->rcb_faddr == 0) {
@@ -310,8 +310,8 @@ raw_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam,
default:
panic("raw_usrreq");
}
-release:
splx(s);
+release:
if (m != NULL)
m_freem(m);
return (error);