mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 20:03:12 +00:00
Do not leak device descriptors in case of error
svn path=/trunk/; revision=43002
This commit is contained in:
parent
fdc770befb
commit
f0d54803ce
1 changed files with 1 additions and 0 deletions
|
@ -332,6 +332,7 @@ LONG ArcOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
|
||||||
if (!FileData[DeviceId].FileFuncTable)
|
if (!FileData[DeviceId].FileFuncTable)
|
||||||
{
|
{
|
||||||
/* Error, unable to detect file system */
|
/* Error, unable to detect file system */
|
||||||
|
pDevice->FuncTable->Close(DeviceId);
|
||||||
FileData[DeviceId].FuncTable = NULL;
|
FileData[DeviceId].FuncTable = NULL;
|
||||||
return ENODEV;
|
return ENODEV;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue