]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/kern/uipc_socket.c
xnu-792.2.4.tar.gz
[apple/xnu.git] / bsd / kern / uipc_socket.c
index 2018446b4d90ee4679e589f44036ec7569050dd8..b0068b4c86a6fe5b88b029c39de8e86a268d95ee 100644 (file)
@@ -646,6 +646,8 @@ sofreelastref(so, dealloc)
 #ifdef __APPLE__
                selthreadclear(&so->so_snd.sb_sel);
                selthreadclear(&so->so_rcv.sb_sel);
+               so->so_rcv.sb_flags &= ~SB_UPCALL;
+               so->so_snd.sb_flags &= ~SB_UPCALL;
 #endif
                return;
        }
@@ -664,6 +666,8 @@ sofreelastref(so, dealloc)
 #ifdef __APPLE__
                        selthreadclear(&so->so_snd.sb_sel);
                        selthreadclear(&so->so_rcv.sb_sel);
+                       so->so_rcv.sb_flags &= ~SB_UPCALL;
+                       so->so_snd.sb_flags &= ~SB_UPCALL;
 #endif
                        socket_unlock(head, 1);
                        return;