[ros-dev] [ros-diffs] [pschweitzer] 64617: [NTFS] - Add a directory entry into FCB which will be a copy of the $FILE_NAME attribute of the FILE record. Though, it won't contain the name itself (in the FCB instead), so k...

Thomas Faber thomas.faber at reactos.org
Wed Oct 8 19:54:05 UTC 2014


On 2014-10-08 21:32, pschweitzer at 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



More information about the Ros-dev mailing list