[FASTFAT] Fail if allocating the stream FO fails.
authorPierre Schweitzer <pierre@reactos.org>
Sun, 20 May 2018 11:53:11 +0000 (13:53 +0200)
committerPierre Schweitzer <pierre@reactos.org>
Sun, 20 May 2018 11:53:43 +0000 (13:53 +0200)
drivers/filesystems/fastfat/dirwr.c

index cffc7af..ab5d9b3 100644 (file)
@@ -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))