From: Pierre Schweitzer Date: Sun, 20 May 2018 11:53:11 +0000 (+0200) Subject: [FASTFAT] Fail if allocating the stream FO fails. X-Git-Tag: 0.4.9-RC~5 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=a10f6c7a0ce2b311027f4460063a25db5ff3b094 [FASTFAT] Fail if allocating the stream FO fails. --- diff --git a/drivers/filesystems/fastfat/dirwr.c b/drivers/filesystems/fastfat/dirwr.c index cffc7af031f..ab5d9b3ee4d 100644 --- a/drivers/filesystems/fastfat/dirwr.c +++ b/drivers/filesystems/fastfat/dirwr.c @@ -47,6 +47,11 @@ vfatFCBInitializeCacheFromVolume( } fileObject = IoCreateStreamFileObject (NULL, vcb->StorageDevice); + if (fileObject == NULL) + { + status = STATUS_INSUFFICIENT_RESOURCES; + goto Quit; + } #ifdef KDBG if (DebugFile.Buffer != NULL && FsRtlIsNameInExpression(&DebugFile, &fcb->LongNameU, FALSE, NULL))