- Move dereferencing of the MessageQueue from co_UserDestroyWindow to co_UserFreeWindow.
A reference is added to the MessageQueue for all windows created.co_UserFreeWindow is called for all windows and needs to be where the dereferencing of MessageQueue occurs.
This fixes NonPagedPool memory leak. See bug 6112 for more info.

svn path=/trunk/; revision=51345
This commit is contained in:
Michael Martin 2011-04-15 07:10:00 +00:00
parent 3b717045b6
commit a2b8986a0d

View file

@ -448,6 +448,8 @@ static LRESULT co_UserFreeWindow(PWND Window,
/* flush the message queue */
MsqRemoveWindowMessagesFromQueue(Window);
IntDereferenceMessageQueue(Window->head.pti->MessageQueue);
/* from now on no messages can be sent to this window anymore */
Window->state |= WNDS_DESTROYED;
Window->fnid |= FNID_FREED;
@ -2508,8 +2510,6 @@ BOOLEAN FASTCALL co_UserDestroyWindow(PWND Window)
}
}
IntDereferenceMessageQueue(Window->head.pti->MessageQueue);
IntEngWindowChanged(Window, WOC_DELETE);
if (!IntIsWindow(Window->head.h))