[NTFS]
authorPierre Schweitzer <pierre@reactos.org>
Wed, 26 Aug 2015 18:55:53 +0000 (18:55 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Wed, 26 Aug 2015 18:55:53 +0000 (18:55 +0000)
Fix two memory leaks

svn path=/trunk/; revision=68830

reactos/drivers/filesystems/ntfs/fsctl.c

index f5ec6b3..fd59588 100644 (file)
@@ -352,6 +352,11 @@ NtfsGetVolumeData(PDEVICE_OBJECT DeviceObject,
         VolumeNameU = L"\0";
     }
 
+    if (NT_SUCCESS(Status))
+    {
+        ReleaseAttributeContext(AttrCtxt);
+    }
+
     VolumeFcb = NtfsCreateFCB(VolumeNameU, NULL, DeviceExt);
     if (VolumeFcb == NULL)
     {
@@ -382,6 +387,11 @@ NtfsGetVolumeData(PDEVICE_OBJECT DeviceObject,
         NtfsInfo->Flags = VolumeInfo->Flags;
     }
 
+    if (NT_SUCCESS(Status))
+    {
+        ReleaseAttributeContext(AttrCtxt);
+    }
+
     ExFreePool(VolumeRecord);
 
     NtfsInfo->MftZoneReservation = NtfsQueryMftZoneReservation();