]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/kern/kern_event.c
xnu-3789.31.2.tar.gz
[apple/xnu.git] / bsd / kern / kern_event.c
index 6d72e54a36bf39408de41d22e39d0f7242789ff9..66cd6e2a534a5e599537e45bd36b08d30dd040c1 100644 (file)
@@ -5167,9 +5167,10 @@ event_unlock(struct socket *so, int refcount, void *lr)
        else
                lr_saved = lr;
 
-       if (refcount)
+       if (refcount) {
+               VERIFY(so->so_usecount > 0);
                so->so_usecount--;
-
+       }
        if (so->so_usecount < 0) {
                panic("%s: so=%p usecount=%d lrh= %s\n", __func__,
                    so, so->so_usecount, solockhistory_nr(so));