mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-04 15:40:44 +00:00
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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=159944
|
@ -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 a new issue