Check for Request == NULL.
authorFilip Navara <filip.navara@gmail.com>
Fri, 2 Sep 2005 13:12:44 +0000 (13:12 +0000)
committerFilip Navara <filip.navara@gmail.com>
Fri, 2 Sep 2005 13:12:44 +0000 (13:12 +0000)
svn path=/trunk/; revision=17604

reactos/ntoskrnl/lpc/reply.c

index ae42bb2..1aeba6e 100644 (file)
@@ -263,6 +263,12 @@ NtReplyWaitReceivePortEx(IN  HANDLE                PortHandle,
    Request = EiDequeueMessagePort(Port);
    KeReleaseSpinLock(&Port->Lock, oldIrql);
 
+   if (Request == NULL)
+     {
+       ObDereferenceObject(Port);
+       return STATUS_UNSUCCESSFUL;
+     }
+
    if (Request->Message.u2.s2.Type == LPC_CONNECTION_REQUEST)
      {
        PORT_MESSAGE Header;