Author: jgardou
Date: Thu Oct 23 20:08:03 2014
New Revision: 64942
URL:
http://svn.reactos.org/svn/reactos?rev=64942&view=rev
Log:
[WIN32K]
- Fix hook leaks.
User object manager creates object with 2 (two, deux, zwei, dos) reference counts.
Modified:
trunk/reactos/win32ss/user/ntuser/hook.c
Modified: trunk/reactos/win32ss/user/ntuser/hook.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/hook.c…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/hook.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/hook.c [iso-8859-1] Thu Oct 23 20:08:03 2014
@@ -1402,7 +1402,7 @@
BOOL Ansi)
{
PWINSTATION_OBJECT WinStaObj;
- PHOOK Hook;
+ PHOOK Hook = NULL;
UNICODE_STRING ModuleName;
NTSTATUS Status;
HHOOK Handle;
@@ -1634,6 +1634,8 @@
RETURN( Handle);
CLEANUP:
+ if (Hook)
+ UserDereferenceObject(Hook);
TRACE("Leave NtUserSetWindowsHookEx, ret=%p\n", _ret_);
UserLeave();
END_CLEANUP;