mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 14:13:01 +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);
|
Status = IoCallDriver(DeviceExtension->LowerDeviceObject, Irp);
|
||||||
|
|
||||||
/* Detach from the device stack */
|
/* Detach from the device stack */
|
||||||
/* IoDetachDevice(DeviceExtension->LowerDeviceObject); */ //This crashes for some reason during unload
|
IoDetachDevice(DeviceExtension->LowerDeviceObject);
|
||||||
|
|
||||||
/* Delete the device object */
|
/* Delete the device object */
|
||||||
IoDeleteDevice(DeviceObject);
|
IoDeleteDevice(DeviceObject);
|
||||||
|
|
|
@ -420,10 +420,10 @@ IopUnloadDevice(IN PDEVICE_OBJECT DeviceObject)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check if we have an attached device and fail if we're attached
|
* 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;
|
AttachedDeviceObject = DeviceObject->AttachedDevice;
|
||||||
if ((AttachedDeviceObject) && (DeviceObject->ReferenceCount)) return;
|
if ((AttachedDeviceObject) || (DeviceObject->ReferenceCount)) return;
|
||||||
|
|
||||||
/* Check if we have a Security Descriptor */
|
/* Check if we have a Security Descriptor */
|
||||||
if (DeviceObject->SecurityDescriptor)
|
if (DeviceObject->SecurityDescriptor)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue