[WIN32K]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 22 Dec 2012 12:22:53 +0000 (12:22 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 22 Dec 2012 12:22:53 +0000 (12:22 +0000)
Don't access the PROCESSINFO after freeing it.

svn path=/trunk/; revision=57968

reactos/win32ss/user/ntuser/main.c

index 27404c4..04157ac 100644 (file)
@@ -226,16 +226,16 @@ Win32kProcessCallback(struct _EPROCESS *Process,
         *pppi = ppiCurrent->ppiNext;
 
         TRACE_CH(UserProcess,"Freeing ppi 0x%p\n", ppiCurrent);
         *pppi = ppiCurrent->ppiNext;
 
         TRACE_CH(UserProcess,"Freeing ppi 0x%p\n", ppiCurrent);
-
-        /* Ftee the PROCESSINFO */
-        PsSetProcessWin32Process(Process, NULL);
-        ExFreePoolWithTag(ppiCurrent, USERTAG_PROCESSINFO);
 #if DBG
         if (DBG_IS_CHANNEL_ENABLED(ppiCurrent, DbgChUserObj, WARN_LEVEL))
         {
             DbgUserDumpHandleTable();
         }
 #endif
 #if DBG
         if (DBG_IS_CHANNEL_ENABLED(ppiCurrent, DbgChUserObj, WARN_LEVEL))
         {
             DbgUserDumpHandleTable();
         }
 #endif
+
+        /* Free the PROCESSINFO */
+        PsSetProcessWin32Process(Process, NULL);
+        ExFreePoolWithTag(ppiCurrent, USERTAG_PROCESSINFO);
     }
 
     RETURN( STATUS_SUCCESS);
     }
 
     RETURN( STATUS_SUCCESS);