https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5efb6e3d972ada88f49c1…
commit 5efb6e3d972ada88f49c1feb5cf65e4240ae7383
Author: Serge Gautherie <32623169+SergeGautherie(a)users.noreply.github.com>
AuthorDate: Mon Nov 14 23:28:33 2022 +0100
Commit: GitHub <noreply(a)github.com>
CommitDate: Tue Nov 15 01:28:33 2022 +0300
[NTFS] NtfsCreateFCB(): Check allocation result (#4795)
---
drivers/filesystems/ntfs/fcb.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/filesystems/ntfs/fcb.c b/drivers/filesystems/ntfs/fcb.c
index 7badedba171..e63b73ee5f0 100644
--- a/drivers/filesystems/ntfs/fcb.c
+++ b/drivers/filesystems/ntfs/fcb.c
@@ -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;