Dereference the event if the queue is freed in IntDereferenceMessageQueue.

svn path=/trunk/; revision=15545
This commit is contained in:
Hartmut Birr 2005-05-27 16:28:10 +00:00
parent b73c53c40c
commit f30557e387

View file

@ -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)); \