Author: pschweitzer
Date: Wed Aug 26 18:55:53 2015
New Revision: 68830
URL:
http://svn.reactos.org/svn/reactos?rev=68830&view=rev
Log:
[NTFS]
Fix two memory leaks
Modified:
trunk/reactos/drivers/filesystems/ntfs/fsctl.c
Modified: trunk/reactos/drivers/filesystems/ntfs/fsctl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/f…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/fsctl.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/fsctl.c [iso-8859-1] Wed Aug 26 18:55:53 2015
@@ -352,6 +352,11 @@
VolumeNameU = L"\0";
}
+ if (NT_SUCCESS(Status))
+ {
+ ReleaseAttributeContext(AttrCtxt);
+ }
+
VolumeFcb = NtfsCreateFCB(VolumeNameU, NULL, DeviceExt);
if (VolumeFcb == NULL)
{
@@ -380,6 +385,11 @@
NtfsInfo->MajorVersion = VolumeInfo->MajorVersion;
NtfsInfo->MinorVersion = VolumeInfo->MinorVersion;
NtfsInfo->Flags = VolumeInfo->Flags;
+ }
+
+ if (NT_SUCCESS(Status))
+ {
+ ReleaseAttributeContext(AttrCtxt);
}
ExFreePool(VolumeRecord);