Fix a FIXME in fastfat driver which also fixes a BSOD in kernel32 path winetest
authorPierre Schweitzer <pierre@reactos.org>
Tue, 6 Jul 2010 18:39:09 +0000 (18:39 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Tue, 6 Jul 2010 18:39:09 +0000 (18:39 +0000)
svn path=/trunk/; revision=47959

reactos/drivers/filesystems/fastfat/dirwr.c

index 174c135..a1da379 100644 (file)
@@ -469,8 +469,12 @@ FATAddEntry(
     CcSetDirtyPinnedData(Context, NULL);
     CcUnpinData(Context);
 
-    /* FIXME: check status */
-    vfatMakeFCBFromDirEntry(DeviceExt, ParentFcb, &DirContext, Fcb);
+    Status = vfatMakeFCBFromDirEntry(DeviceExt, ParentFcb, &DirContext, Fcb);
+    if (!NT_SUCCESS(Status))
+    {
+        ExFreePoolWithTag(Buffer, TAG_VFAT);
+        return Status;
+    }
 
     DPRINT("new : entry=%11.11s\n", (*Fcb)->entry.Fat.Filename);
     DPRINT("new : entry=%11.11s\n", DirContext.DirEntry.Fat.Filename);