diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index f5e75d1de613..9c4b547767cf 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;