From f30557e3875f3f598eb330c9f1bfcf843268a603 Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Fri, 27 May 2005 16:28:10 +0000 Subject: [PATCH] Dereference the event if the queue is freed in IntDereferenceMessageQueue. svn path=/trunk/; revision=15545 --- reactos/subsys/win32k/include/msgqueue.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/reactos/subsys/win32k/include/msgqueue.h b/reactos/subsys/win32k/include/msgqueue.h index 6a51d017f7e..d9e7eeb7a80 100644 --- a/reactos/subsys/win32k/include/msgqueue.h +++ b/reactos/subsys/win32k/include/msgqueue.h @@ -239,6 +239,8 @@ VOID STDCALL MsqRemoveWindowMessagesFromQueue(PVOID pWindow); /* F*(&$ headers, if(InterlockedDecrement(&(MsgQueue)->References) == 0) \ { \ DPRINT("Free message queue 0x%x\n", (MsgQueue)); \ + if ((MsgQueue)->NewMessages != NULL) \ + ObDereferenceObject((MsgQueue)->NewMessages); \ if ((MsgQueue)->NewMessagesHandle != NULL) \ ZwClose((MsgQueue)->NewMessagesHandle); \ ExFreePool((MsgQueue)); \