mirror of
https://github.com/reactos/reactos.git
synced 2024-07-12 07:35:10 +00:00
[WIN32K]
- Do not leak process references (In|De)crementGdiHandleCount. CORE-7565 #resolve svn path=/trunk/; revision=60924
This commit is contained in:
parent
82703397cf
commit
c605d9f054
|
@ -249,6 +249,7 @@ IncrementGdiHandleCount(ULONG ulProcessId)
|
||||||
|
|
||||||
ppi = PsGetProcessWin32Process(pep);
|
ppi = PsGetProcessWin32Process(pep);
|
||||||
if (ppi) InterlockedIncrement((LONG*)&ppi->GDIHandleCount);
|
if (ppi) InterlockedIncrement((LONG*)&ppi->GDIHandleCount);
|
||||||
|
if (NT_SUCCESS(Status)) ObDereferenceObject(pep);
|
||||||
}
|
}
|
||||||
|
|
||||||
FORCEINLINE
|
FORCEINLINE
|
||||||
|
@ -264,6 +265,7 @@ DecrementGdiHandleCount(ULONG ulProcessId)
|
||||||
|
|
||||||
ppi = PsGetProcessWin32Process(pep);
|
ppi = PsGetProcessWin32Process(pep);
|
||||||
if (ppi) InterlockedDecrement((LONG*)&ppi->GDIHandleCount);
|
if (ppi) InterlockedDecrement((LONG*)&ppi->GDIHandleCount);
|
||||||
|
if (NT_SUCCESS(Status)) ObDereferenceObject(pep);
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
|
|
Loading…
Reference in a new issue