Author: sginsberg
Date: Tue Jan 13 17:41:34 2009
New Revision: 38750
URL:
http://svn.reactos.org/svn/reactos?rev=38750&view=rev
Log:
- NtUserSetWindowsHookEx: Don't leak a thread reference in case we are passed a Thread
Id
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/hook.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/hook.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/hook.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/hook.c [iso-8859-1] Tue Jan 13 17:41:34
2009
@@ -1156,6 +1156,11 @@
ClientInfo->phkCurrent = 0;
UserDereferenceObject(Hook);
+
+ if (NULL != Thread)
+ {
+ ObDereferenceObject(Thread);
+ }
ObDereferenceObject(WinStaObj);
RETURN( Handle);