Avoid closing the cdrom if we failed to open it.

This commit is contained in:
Alexandre Julliard 2003-10-03 04:35:55 +00:00
parent 78a7c5f28e
commit fbb5390a32
1 changed files with 1 additions and 2 deletions

View File

@ -1915,11 +1915,10 @@ NTSTATUS CDROM_DeviceIoControl(DWORD clientID, HANDLE hDevice,
status = STATUS_INVALID_PARAMETER; status = STATUS_INVALID_PARAMETER;
break; break;
} }
CDROM_Close(clientID);
error: error:
piosb->u.Status = status; piosb->u.Status = status;
piosb->Information = sz; piosb->Information = sz;
if (hEvent) NtSetEvent(hEvent, NULL); if (hEvent) NtSetEvent(hEvent, NULL);
CDROM_Close(clientID);
return status; return status;
} }