On 2014-10-08 21:32, pschweit...@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@reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev

Reply via email to