Author: pschweitzer
Date: Wed Oct 8 20:02:09 2014
New Revision: 64625
URL:
http://svn.reactos.org/svn/reactos?rev=64625&view=rev
Log:
[NTFS]
Hello, please don't leak memory.
Cheers.
Spotted by Thomas
Modified:
trunk/reactos/drivers/filesystems/ntfs/fcb.c
Modified: trunk/reactos/drivers/filesystems/ntfs/fcb.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/f…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/fcb.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/fcb.c [iso-8859-1] Wed Oct 8 20:02:09 2014
@@ -285,18 +285,21 @@
if (!NT_SUCCESS(ReadFileRecord(Vcb, NTFS_FILE_ROOT, MftRecord)))
{
+ ExFreePoolWithTag(MftRecord, TAG_NTFS);
return NULL;
}
FileName = GetFileNameFromRecord(MftRecord);
if (!FileName)
{
+ ExFreePoolWithTag(MftRecord, TAG_NTFS);
return NULL;
}
Fcb = NtfsCreateFCB(L"\\", Vcb);
if (!Fcb)
{
+ ExFreePoolWithTag(MftRecord, TAG_NTFS);
return NULL;
}
@@ -314,6 +317,8 @@
NtfsFCBInitializeCache(Vcb, Fcb);
NtfsAddFCBToTable(Vcb, Fcb);
NtfsGrabFCB(Vcb, Fcb);
+
+ ExFreePoolWithTag(MftRecord, TAG_NTFS);
return Fcb;
}