mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 19:08:58 +00:00
Make sure to free the socket in soabort() if the protocol couldn't
free it (this could happen if the protocol already freed its part and we just kept the socket around to make sure accept(2) didn't block)
This commit is contained in:
parent
6cb533fe1c
commit
95b2b777b5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=58225
@ -297,8 +297,14 @@ int
|
||||
soabort(so)
|
||||
struct socket *so;
|
||||
{
|
||||
int error;
|
||||
|
||||
return (*so->so_proto->pr_usrreqs->pru_abort)(so);
|
||||
error = (*so->so_proto->pr_usrreqs->pru_abort)(so);
|
||||
if (error) {
|
||||
sofree(so);
|
||||
return error;
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user