mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +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)))
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -315,6 +318,8 @@ NtfsMakeRootFCB(PNTFS_VCB Vcb)
|
|||
NtfsAddFCBToTable(Vcb, Fcb);
|
||||
NtfsGrabFCB(Vcb, Fcb);
|
||||
|
||||
ExFreePoolWithTag(MftRecord, TAG_NTFS);
|
||||
|
||||
return Fcb;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue