From 02488d3f4963262b4cb49ae4ad4091fb3ae9fd36 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Fri, 2 Sep 2005 13:12:44 +0000 Subject: [PATCH] Check for Request == NULL. svn path=/trunk/; revision=17604 --- reactos/ntoskrnl/lpc/reply.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/reactos/ntoskrnl/lpc/reply.c b/reactos/ntoskrnl/lpc/reply.c index ae42bb28c44..1aeba6e9acf 100644 --- a/reactos/ntoskrnl/lpc/reply.c +++ b/reactos/ntoskrnl/lpc/reply.c @@ -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;