Author: tfaber
Date: Sat Apr 16 10:22:35 2016
New Revision: 71167
URL:
http://svn.reactos.org/svn/reactos?rev=71167&view=rev
Log:
[WIN32K:NTUSER]
- Don't leak desktop reference in failure case of NtUserSwitchDesktop
Modified:
trunk/reactos/win32ss/user/ntuser/desktop.c
Modified: trunk/reactos/win32ss/user/ntuser/desktop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/deskto…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/desktop.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/desktop.c [iso-8859-1] Sat Apr 16 10:22:35 2016
@@ -1791,12 +1791,14 @@
if (PsGetCurrentProcessSessionId() != pdesk->rpwinstaParent->dwSessionId)
{
+ ObDereferenceObject(pdesk);
ERR("NtUserSwitchDesktop called for a desktop of a different
session\n");
RETURN(FALSE);
}
if(pdesk == gpdeskInputDesktop)
{
+ ObDereferenceObject(pdesk);
WARN("NtUserSwitchDesktop called for active desktop\n");
RETURN(TRUE);
}