check for failure of vfatAttachFCBToFileObject() during file creation
authorRoyce Mitchell III <royce3@ev1.net>
Fri, 12 Aug 2005 16:49:04 +0000 (16:49 +0000)
committerRoyce Mitchell III <royce3@ev1.net>
Fri, 12 Aug 2005 16:49:04 +0000 (16:49 +0000)
svn path=/trunk/; revision=17328

reactos/drivers/fs/vfat/create.c

index 800a66a..41ef6f2 100644 (file)
@@ -564,7 +564,12 @@ VfatCreateFile (PDEVICE_OBJECT DeviceObject, PIRP Irp)
           vfatReleaseFCB (DeviceExt, ParentFcb);
          if (NT_SUCCESS (Status))
            {
-              vfatAttachFCBToFileObject (DeviceExt, pFcb, FileObject);
+              Status = vfatAttachFCBToFileObject (DeviceExt, pFcb, FileObject);
+              if ( !NT_SUCCESS(Status) )
+              {
+                 vfatReleaseFCB (DeviceExt, pFcb);
+                 return Status;
+              }
 
              Irp->IoStatus.Information = FILE_CREATED;