- Do not leak process references (In|De)crementGdiHandleCount.
CORE-7565 #resolve

svn path=/trunk/; revision=60924
This commit is contained in:
Thomas Faber 2013-11-10 22:31:01 +00:00
parent 82703397cf
commit c605d9f054

View file

@ -249,6 +249,7 @@ IncrementGdiHandleCount(ULONG ulProcessId)
ppi = PsGetProcessWin32Process(pep);
if (ppi) InterlockedIncrement((LONG*)&ppi->GDIHandleCount);
if (NT_SUCCESS(Status)) ObDereferenceObject(pep);
}
FORCEINLINE
@ -264,6 +265,7 @@ DecrementGdiHandleCount(ULONG ulProcessId)
ppi = PsGetProcessWin32Process(pep);
if (ppi) InterlockedDecrement((LONG*)&ppi->GDIHandleCount);
if (NT_SUCCESS(Status)) ObDereferenceObject(pep);
}
static