Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/uipc_socket.c
Show First 20 Lines • Show All 1,189 Lines • ▼ Show 20 Lines | sofree(struct socket *so) | ||||
if (SOLISTENING(so)) | if (SOLISTENING(so)) | ||||
so->so_error = ECONNABORTED; | so->so_error = ECONNABORTED; | ||||
SOCK_UNLOCK(so); | SOCK_UNLOCK(so); | ||||
if (so->so_dtor != NULL) | if (so->so_dtor != NULL) | ||||
so->so_dtor(so); | so->so_dtor(so); | ||||
VNET_SO_ASSERT(so); | VNET_SO_ASSERT(so); | ||||
if (pr->pr_flags & PR_RIGHTS) { | if ((pr->pr_flags & PR_RIGHTS) && !SOLISTENING(so)) { | ||||
MPASS(pr->pr_domain->dom_dispose != NULL); | MPASS(pr->pr_domain->dom_dispose != NULL); | ||||
(*pr->pr_domain->dom_dispose)(so); | (*pr->pr_domain->dom_dispose)(so); | ||||
} | } | ||||
if (pr->pr_usrreqs->pru_detach != NULL) | if (pr->pr_usrreqs->pru_detach != NULL) | ||||
(*pr->pr_usrreqs->pru_detach)(so); | (*pr->pr_usrreqs->pru_detach)(so); | ||||
/* | /* | ||||
* From this point on, we assume that no other references to this | * From this point on, we assume that no other references to this | ||||
▲ Show 20 Lines • Show All 3,342 Lines • Show Last 20 Lines |