Ah yes! Oopsie :-$
Let's not add more leaks into it!
On 08/10/2014 21:54, Thomas Faber wrote:
On 2014-10-08 21:32, pschweitzer(a)svn.reactos.org
wrote:
+ MftRecord =
ExAllocatePoolWithTag(NonPagedPool,
+ Vcb->NtfsInfo.BytesPerFileRecord,
+ TAG_NTFS);
+ if (MftRecord == NULL)
+ {
+ return NULL;
+ }
+
+ if (!NT_SUCCESS(ReadFileRecord(Vcb, NTFS_FILE_ROOT, MftRecord)))
+ {
+ return NULL;
+ }
+
+ FileName = GetFileNameFromRecord(MftRecord);
+ if (!FileName)
+ {
+ return NULL;
+ }
Fcb = NtfsCreateFCB(L"\\", Vcb);
-
-// memset(Fcb->entry.Filename, ' ', 11);
-
-// Fcb->Entry.DataLengthL = Vcb->CdInfo.RootSize;
-// Fcb->Entry.ExtentLocationL = Vcb->CdInfo.RootStart;
-// Fcb->Entry.FileFlags = 0x02; // FILE_ATTRIBUTE_DIRECTORY;
+ if (!Fcb)
+ {
+ return NULL;
+ }
These failure cases look like they're all at least leaking MftRecord :p
_______________________________________________
Ros-dev mailing list
Ros-dev(a)reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev
--
Pierre Schweitzer <pierre at reactos.org>
System & Network Administrator
Senior Kernel Developer
ReactOS Deutschland e.V.