[NTOS:FSTUB]
authorThomas Faber <thomas.faber@reactos.org>
Sat, 19 Jul 2014 17:50:56 +0000 (17:50 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sat, 19 Jul 2014 17:50:56 +0000 (17:50 +0000)
- Make sure to NULL the return pointer in the failure case of xHalIoReadPartitionTable.
CORE-8359

svn path=/trunk/; revision=63722

reactos/ntoskrnl/fstub/disksup.c

index 86a7e0a..f5aeb41 100644 (file)
@@ -1787,7 +1787,11 @@ xHalIoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject,
 
     /* Free the buffer and check for success */
     if (Buffer) ExFreePoolWithTag(Buffer, TAG_FILE_SYSTEM);
-    if (!NT_SUCCESS(Status)) ExFreePoolWithTag(*PartitionBuffer, TAG_FILE_SYSTEM);
+    if (!NT_SUCCESS(Status))
+    {
+        ExFreePoolWithTag(*PartitionBuffer, TAG_FILE_SYSTEM);
+        *PartitionBuffer = NULL;
+    }
 
     /* Return status */
     return Status;