summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_usrreq.c
diff options
context:
space:
mode:
authorhsu <hsu@FreeBSD.org>2002-06-13 23:14:58 +0000
committerhsu <hsu@FreeBSD.org>2002-06-13 23:14:58 +0000
commitc78cdaf83b302a20c3707663199af2301919ed93 (patch)
tree5d7a1fbc06b2403273fd4620c50d38fa95474a29 /sys/netinet/tcp_usrreq.c
parentf96d2575ed0e9a926310c6a2305c393e4b600030 (diff)
downloadFreeBSD-src-c78cdaf83b302a20c3707663199af2301919ed93.zip
FreeBSD-src-c78cdaf83b302a20c3707663199af2301919ed93.tar.gz
Because we're holding an exclusive write lock on the head, references to
the new inp cannot leak out even though it has been placed on the head list.
Diffstat (limited to 'sys/netinet/tcp_usrreq.c')
-rw-r--r--sys/netinet/tcp_usrreq.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index f5e75d1..9c4b547 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -141,12 +141,9 @@ tcp_usr_attach(struct socket *so, int proto, struct thread *td)
so->so_linger = TCP_LINGERTIME;
inp = sotoinpcb(so);
- INP_LOCK(inp);
tp = intotcpcb(inp);
out:
TCPDEBUG2(PRU_ATTACH);
- if (tp)
- INP_UNLOCK(inp);
INP_INFO_WUNLOCK(&tcbinfo);
splx(s);
return error;
OpenPOWER on IntegriCloud