Author: tfaber
Date: Sun Nov 10 22:31:01 2013
New Revision: 60924
URL:
http://svn.reactos.org/svn/reactos?rev=60924&view=rev
Log:
[WIN32K]
- Do not leak process references (In|De)crementGdiHandleCount.
CORE-7565 #resolve
Modified:
trunk/reactos/win32ss/gdi/ntgdi/gdiobj.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/gdiobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/gdiobj.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/gdiobj.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/gdiobj.c [iso-8859-1] Sun Nov 10 22:31:01 2013
@@ -249,6 +249,7 @@
ppi = PsGetProcessWin32Process(pep);
if (ppi) InterlockedIncrement((LONG*)&ppi->GDIHandleCount);
+ if (NT_SUCCESS(Status)) ObDereferenceObject(pep);
}
FORCEINLINE
@@ -264,6 +265,7 @@
ppi = PsGetProcessWin32Process(pep);
if (ppi) InterlockedDecrement((LONG*)&ppi->GDIHandleCount);
+ if (NT_SUCCESS(Status)) ObDereferenceObject(pep);
}
static