In tcp6_usr_attach(), return immediately if SS_ISDISCONNECTED, to
avoid dereferencing an uninitialized inp variable. Submitted by: Michiel Boland <michiel at boland dot org> MFC after: 1 month
This commit is contained in:
parent
8ca0124685
commit
b4470c1639
@ -647,10 +647,8 @@ tcp6_usr_accept(struct socket *so, struct sockaddr **nam)
|
||||
int v4 = 0;
|
||||
TCPDEBUG0;
|
||||
|
||||
if (so->so_state & SS_ISDISCONNECTED) {
|
||||
error = ECONNABORTED;
|
||||
goto out;
|
||||
}
|
||||
if (so->so_state & SS_ISDISCONNECTED)
|
||||
return (ECONNABORTED);
|
||||
|
||||
inp = sotoinpcb(so);
|
||||
KASSERT(inp != NULL, ("tcp6_usr_accept: inp == NULL"));
|
||||
|
Loading…
Reference in New Issue
Block a user