unix: don't call sbrelease() in uipc_detach()

Since a982ce0442 the socket buffer is already cleared and released in
unp_dispose() that is called just before uipc_detach().
This commit is contained in:
Gleb Smirnoff 2022-05-12 11:02:50 -07:00
parent 6d31772360
commit 1f32cef471

View File

@ -790,18 +790,6 @@ uipc_detach(struct socket *so)
vp = NULL;
vplock = NULL;
SOCK_LOCK(so);
if (!SOLISTENING(so)) {
/*
* Once the socket is removed from the global lists,
* uipc_ready() will not be able to locate its socket buffer, so
* clear the buffer now. At this point internalized rights have
* already been disposed of.
*/
sbrelease(&so->so_rcv, so);
}
SOCK_UNLOCK(so);
UNP_LINK_WLOCK();
LIST_REMOVE(unp, unp_link);
if (unp->unp_gcflag & UNPGC_DEAD)