mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[USB-BRINGUP-TRUNK]
- Fix a broken check that resulted in freeing the same device object twice - Enable the IoDetachDevice call in usbstor now that the kernel bug is fixed svn path=/branches/usb-bringup-trunk/; revision=55086
This commit is contained in:
parent
7ec08a5b86
commit
3de4023a19
2 changed files with 3 additions and 3 deletions
|
@ -135,7 +135,7 @@ USBSTOR_FdoHandleRemoveDevice(
|
|||
Status = IoCallDriver(DeviceExtension->LowerDeviceObject, Irp);
|
||||
|
||||
/* Detach from the device stack */
|
||||
/* IoDetachDevice(DeviceExtension->LowerDeviceObject); */ //This crashes for some reason during unload
|
||||
IoDetachDevice(DeviceExtension->LowerDeviceObject);
|
||||
|
||||
/* Delete the device object */
|
||||
IoDeleteDevice(DeviceObject);
|
||||
|
|
|
@ -420,10 +420,10 @@ IopUnloadDevice(IN PDEVICE_OBJECT DeviceObject)
|
|||
|
||||
/*
|
||||
* Check if we have an attached device and fail if we're attached
|
||||
* and still have a reference count.
|
||||
* or still have a reference count.
|
||||
*/
|
||||
AttachedDeviceObject = DeviceObject->AttachedDevice;
|
||||
if ((AttachedDeviceObject) && (DeviceObject->ReferenceCount)) return;
|
||||
if ((AttachedDeviceObject) || (DeviceObject->ReferenceCount)) return;
|
||||
|
||||
/* Check if we have a Security Descriptor */
|
||||
if (DeviceObject->SecurityDescriptor)
|
||||
|
|
Loading…
Reference in a new issue