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/nt…
==============================================================================
--- 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);
Author: fireball
Date: Thu Apr 14 12:20:47 2011
New Revision: 51339
URL: http://svn.reactos.org/svn/reactos?rev=51339&view=rev
Log:
[RTL]
- If there is no data provided and parameters are valid, fail with STATUS_SXS_KEY_NOT_FOUND.
Modified:
trunk/reactos/lib/rtl/actctx.c
Modified: trunk/reactos/lib/rtl/actctx.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/actctx.c?rev=51339…
==============================================================================
--- trunk/reactos/lib/rtl/actctx.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/actctx.c [iso-8859-1] Thu Apr 14 12:20:47 2011
@@ -2710,6 +2710,10 @@
status = STATUS_SXS_KEY_NOT_FOUND;
+ /* if there is no data, but params are valid,
+ we return that sxs key is not found to be at least somehow compatible */
+ if (!data) return status;
+
ASSERT(NtCurrentTeb());
ASSERT(NtCurrentTeb()->ActivationContextStackPointer);