mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 14:30:57 +00:00
[NTFS]
Hello, please don't leak memory. Cheers. Spotted by Thomas svn path=/trunk/; revision=64625
This commit is contained in:
parent
60d23c0d1d
commit
55fe55e6c5
1 changed files with 5 additions and 0 deletions
|
@ -285,18 +285,21 @@ NtfsMakeRootFCB(PNTFS_VCB Vcb)
|
||||||
|
|
||||||
if (!NT_SUCCESS(ReadFileRecord(Vcb, NTFS_FILE_ROOT, MftRecord)))
|
if (!NT_SUCCESS(ReadFileRecord(Vcb, NTFS_FILE_ROOT, MftRecord)))
|
||||||
{
|
{
|
||||||
|
ExFreePoolWithTag(MftRecord, TAG_NTFS);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
FileName = GetFileNameFromRecord(MftRecord);
|
FileName = GetFileNameFromRecord(MftRecord);
|
||||||
if (!FileName)
|
if (!FileName)
|
||||||
{
|
{
|
||||||
|
ExFreePoolWithTag(MftRecord, TAG_NTFS);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Fcb = NtfsCreateFCB(L"\\", Vcb);
|
Fcb = NtfsCreateFCB(L"\\", Vcb);
|
||||||
if (!Fcb)
|
if (!Fcb)
|
||||||
{
|
{
|
||||||
|
ExFreePoolWithTag(MftRecord, TAG_NTFS);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -315,6 +318,8 @@ NtfsMakeRootFCB(PNTFS_VCB Vcb)
|
||||||
NtfsAddFCBToTable(Vcb, Fcb);
|
NtfsAddFCBToTable(Vcb, Fcb);
|
||||||
NtfsGrabFCB(Vcb, Fcb);
|
NtfsGrabFCB(Vcb, Fcb);
|
||||||
|
|
||||||
|
ExFreePoolWithTag(MftRecord, TAG_NTFS);
|
||||||
|
|
||||||
return Fcb;
|
return Fcb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue