Author: jgardou
Date: Tue Oct 21 10:45:49 2014
New Revision: 64862
URL:
http://svn.reactos.org/svn/reactos?rev=64862&view=rev
Log:
[WIN32K]
- Avoid use after free in debug configuration
CORE-8661 #resolve
Modified:
trunk/reactos/win32ss/user/ntuser/object.c
Modified: trunk/reactos/win32ss/user/ntuser/object.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/object…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/object.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/object.c [iso-8859-1] Tue Oct 21 10:45:49 2014
@@ -710,14 +710,15 @@
return;
}
+#if DBG
+ oldppi->DbgHandleCount[type]--;
+ ppi->DbgHandleCount[type]++;
+#endif
+
oldppi->UserHandleCount--;
IntDereferenceProcessInfo(oldppi);
ppi->UserHandleCount++;
IntReferenceProcessInfo(ppi);
-#if DBG
- oldppi->DbgHandleCount[type]--;
- ppi->DbgHandleCount[type]++;
-#endif
}
BOOLEAN