Do not leak device descriptors in case of error
authorHervé Poussineau <hpoussin@reactos.org>
Sun, 6 Sep 2009 14:21:00 +0000 (14:21 +0000)
committerHervé Poussineau <hpoussin@reactos.org>
Sun, 6 Sep 2009 14:21:00 +0000 (14:21 +0000)
svn path=/trunk/; revision=43002

reactos/boot/freeldr/freeldr/fs/fs.c

index cf46406..24fcae1 100644 (file)
@@ -332,6 +332,7 @@ LONG ArcOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
                 if (!FileData[DeviceId].FileFuncTable)
                 {
                     /* Error, unable to detect file system */
+                    pDevice->FuncTable->Close(DeviceId);
                     FileData[DeviceId].FuncTable = NULL;
                     return ENODEV;
                 }