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.
This commit is contained in:
hsu 2002-06-13 23:14:58 +00:00
parent f96d2575ed
commit c78cdaf83b

View File

@ -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;