When aborting tcp_attach() due to a problem allocating or attaching the
tcpcb, lock the inpcb before calling in_pcbdetach() or in6_pcbdetach(), as they expect the inpcb to be passed locked. MFC after: 7 days
This commit is contained in:
parent
fc80f5f380
commit
d363d282f8
@ -1211,6 +1211,8 @@ tcp_attach(so)
|
||||
int nofd = so->so_state & SS_NOFDREF; /* XXX */
|
||||
|
||||
so->so_state &= ~SS_NOFDREF; /* don't free the socket yet */
|
||||
|
||||
INP_LOCK(inp);
|
||||
#ifdef INET6
|
||||
if (isipv6)
|
||||
in6_pcbdetach(inp);
|
||||
|
Loading…
Reference in New Issue
Block a user