summaryrefslogtreecommitdiffstats
path: root/sys/netinet/udp_usrreq.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2003-08-19 17:11:46 +0000
committersam <sam@FreeBSD.org>2003-08-19 17:11:46 +0000
commitfb194d508d9179e3baae0806b283deb5727fc788 (patch)
tree6363c3a40a47a8a9592db305fe05d408123c04ff /sys/netinet/udp_usrreq.c
parentf002fc1bb1c87103e4aecafd8d2e85d5c499adb1 (diff)
downloadFreeBSD-src-fb194d508d9179e3baae0806b283deb5727fc788.zip
FreeBSD-src-fb194d508d9179e3baae0806b283deb5727fc788.tar.gz
add missing unlock when in_pcballoc returns an error
Diffstat (limited to 'sys/netinet/udp_usrreq.c')
-rw-r--r--sys/netinet/udp_usrreq.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 7c1d8d9..794461e 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -903,8 +903,10 @@ udp_attach(struct socket *so, int proto, struct thread *td)
s = splnet();
error = in_pcballoc(so, &udbinfo, td);
splx(s);
- if (error)
+ if (error) {
+ INP_INFO_WUNLOCK(&udbinfo);
return error;
+ }
inp = (struct inpcb *)so->so_pcb;
INP_LOCK(inp);
OpenPOWER on IntegriCloud