Move destroying kqueue state from above pru_detach to below it in
sofree(), as a number of protocols expect to be able to call soisdisconnected() during detach. That may not be a good assumption, but until I'm sure if it's a good assumption or not, allow it.
This commit is contained in:
parent
4cbe83eb60
commit
9126410f4b
@ -608,10 +608,10 @@ sofree(so)
|
||||
if (pr->pr_flags & PR_RIGHTS && pr->pr_domain->dom_dispose != NULL)
|
||||
(*pr->pr_domain->dom_dispose)(so->so_rcv.sb_mb);
|
||||
sbdestroy(&so->so_rcv, so);
|
||||
knlist_destroy(&so->so_rcv.sb_sel.si_note);
|
||||
knlist_destroy(&so->so_snd.sb_sel.si_note);
|
||||
if (pr->pr_usrreqs->pru_detach != NULL)
|
||||
(*pr->pr_usrreqs->pru_detach)(so);
|
||||
knlist_destroy(&so->so_rcv.sb_sel.si_note);
|
||||
knlist_destroy(&so->so_snd.sb_sel.si_note);
|
||||
sodealloc(so);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user