[NTFS] NtfsCreateFCB(): Check allocation result (#4795)

This commit is contained in:
Serge Gautherie 2022-11-14 23:28:33 +01:00 committed by GitHub
parent a09e903398
commit 5efb6e3d97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -74,6 +74,11 @@ NtfsCreateFCB(PCWSTR FileName,
ASSERT(Vcb->Identifier.Type == NTFS_TYPE_VCB);
Fcb = ExAllocateFromNPagedLookasideList(&NtfsGlobalData->FcbLookasideList);
if (Fcb == NULL)
{
return NULL;
}
RtlZeroMemory(Fcb, sizeof(NTFS_FCB));
Fcb->Identifier.Type = NTFS_TYPE_FCB;