projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8270339
)
[WIN32K]
author
Thomas Faber
<thomas.faber@reactos.org>
Sun, 10 Nov 2013 22:31:01 +0000
(22:31 +0000)
committer
Thomas Faber
<thomas.faber@reactos.org>
Sun, 10 Nov 2013 22:31:01 +0000
(22:31 +0000)
- Do not leak process references (In|De)crementGdiHandleCount.
CORE-7565 #resolve
svn path=/trunk/; revision=60924
reactos/win32ss/gdi/ntgdi/gdiobj.c
patch
|
blob
|
history
diff --git
a/reactos/win32ss/gdi/ntgdi/gdiobj.c
b/reactos/win32ss/gdi/ntgdi/gdiobj.c
index
740fd92
..
34f3366
100644
(file)
--- a/
reactos/win32ss/gdi/ntgdi/gdiobj.c
+++ b/
reactos/win32ss/gdi/ntgdi/gdiobj.c
@@
-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