]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/net/kpi_protocol.c
xnu-4903.221.2.tar.gz
[apple/xnu.git] / bsd / net / kpi_protocol.c
index f35b2b10b76976abf2e61b8e5efbced8dc66280a..6265a4b4bb53c58629a69fbee8d5b5582ea70b42 100644 (file)
@@ -193,7 +193,7 @@ proto_input_run(void)
        mbuf_t packet_list;
        int i, locked = 0;
 
-       lck_mtx_assert(&inp->input_lck, LCK_MTX_ASSERT_NOTOWNED);
+       LCK_MTX_ASSERT(&inp->input_lck, LCK_MTX_ASSERT_NOTOWNED);
 
        if (inp->input_waiting & DLIL_PROTO_REGISTER) {
                lck_mtx_lock_spin(&inp->input_lck);
@@ -266,6 +266,9 @@ proto_input(protocol_family_t protocol, mbuf_t packet_list)
                        break;
        }
 
+       if (entry == NULL)
+               return (-1);
+
        if (entry->domain && !(entry->domain->dom_flags & DOM_REENTRANT)) {
                lck_mtx_lock(entry->domain->dom_mtx);
                locked = 1;