Synchronize with trunk revision 59636 (just before Alex's CreateProcess revamp).
[reactos.git] / include / ddk / ntddk.h
index 870566d..961b0ca 100644 (file)
@@ -3350,9 +3350,10 @@ static __inline PVOID
 ExAllocateFromZone(
   IN PZONE_HEADER Zone)
 {
+  PVOID Result = (PVOID)Zone->FreeList.Next;
   if (Zone->FreeList.Next)
     Zone->FreeList.Next = Zone->FreeList.Next->Next;
-  return (PVOID) Zone->FreeList.Next;
+  return Result;
 }
 
 static __inline PVOID