Loading...
iokit/Kernel/IODataQueue.cpp xnu-792.22.5 xnu-1228
--- xnu/xnu-792.22.5/iokit/Kernel/IODataQueue.cpp
+++ xnu/xnu-1228/iokit/Kernel/IODataQueue.cpp
@@ -82,9 +82,9 @@
         return false;
     }
 
-    dataQueue->queueSize = size;
-    dataQueue->head = 0;
-    dataQueue->tail = 0;
+    dataQueue->queueSize    = size;
+    dataQueue->head         = 0;
+    dataQueue->tail         = 0;
 
     return true;
 }
@@ -208,7 +208,7 @@
     mach_msg_header_t *	msgh;
 
     msgh = (mach_msg_header_t *)notifyMsg;
-    if (msgh) {
+    if (msgh && msgh->msgh_remote_port) {
         kr = mach_msg_send_from_kernel(msgh, msgh->msgh_size);
         switch(kr) {
             case MACH_SEND_TIMED_OUT:	// Notification already sent