[FASTFAT]
authorPierre Schweitzer <pierre@reactos.org>
Mon, 27 Oct 2014 13:39:03 +0000 (13:39 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Mon, 27 Oct 2014 13:39:03 +0000 (13:39 +0000)
Don't leak reference in case of share access failure.

svn path=/trunk/; revision=65043

reactos/drivers/filesystems/fastfat/create.c

index fb4261b..ffe23bc 100644 (file)
@@ -443,9 +443,9 @@ VfatCreateFile(
     PVFATFCB pFcb = NULL;
     PVFATFCB ParentFcb = NULL;
     PWCHAR c, last;
-    BOOLEAN PagingFileCreate = FALSE;
+    BOOLEAN PagingFileCreate;
     BOOLEAN Dots;
-    BOOLEAN OpenTargetDir = FALSE;
+    BOOLEAN OpenTargetDir;
     UNICODE_STRING FileNameU;
     UNICODE_STRING PathNameU;
     ULONG Attributes;
@@ -633,6 +633,7 @@ VfatCreateFile(
                                             FALSE);
                 if (!NT_SUCCESS(Status))
                 {
+                    vfatReleaseFCB(DeviceExt, ParentFcb);
                     VfatCloseFile(DeviceExt, FileObject);
                     return Status;
                 }