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:
Bill Fenner 2000-03-18 08:56:56 +00:00
parent 6cb533fe1c
commit 95b2b777b5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=58225

View File

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