Author: mjmartin
Date: Fri Apr 15 07:10:00 2011
New Revision: 51345

URL: http://svn.reactos.org/svn/reactos?rev=51345&view=rev
Log:
[win32k]
- 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.

Modified:
    trunk/reactos/subsystems/win32/win32k/ntuser/window.c

Modified: trunk/reactos/subsystems/win32/win32k/ntuser/window.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/window.c?rev=51345&r1=51344&r2=51345&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] 
(original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] Fri Apr 
15 07:10:00 2011
@@ -447,6 +447,8 @@
 
    /* 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;
@@ -2507,8 +2509,6 @@
          ti->pDeskInfo->hShellWindow = NULL;
       }
    }
-
-   IntDereferenceMessageQueue(Window->head.pti->MessageQueue);
 
    IntEngWindowChanged(Window, WOC_DELETE);
 


Reply via email to