}
}
+ // Freeing everything in DeviceExtension
+ ASSERT(
+ DeviceExtension->DeviceDescriptor &&
+ DeviceExtension->ConfigurationDescriptor &&
+ DeviceExtension->InterfaceInformation &&
+ DeviceExtension->ResetDeviceWorkItem
+ );
+
+ ExFreePoolWithTag(DeviceExtension->DeviceDescriptor, USB_STOR_TAG);
+ ExFreePoolWithTag(DeviceExtension->ConfigurationDescriptor, USB_STOR_TAG);
+ ExFreePoolWithTag(DeviceExtension->InterfaceInformation, USB_STOR_TAG);
+ IoFreeWorkItem(DeviceExtension->ResetDeviceWorkItem);
+
+ if (DeviceExtension->SerialNumber)
+ {
+ ExFreePoolWithTag(DeviceExtension->SerialNumber, USB_STOR_TAG);
+ }
+
// Send the IRP down the stack
IoSkipCurrentIrpStackLocation(Irp);
+ Irp->IoStatus.Status = STATUS_SUCCESS;
Status = IoCallDriver(DeviceExtension->LowerDeviceObject, Irp);
// Detach from the device stack
bDelete = FALSE;
}
+ // clean up the device extension
+ ASSERT(DeviceExtension->InquiryData);
+ ExFreePoolWithTag(DeviceExtension->InquiryData, USB_STOR_TAG);
+
Irp->IoStatus.Status = STATUS_SUCCESS;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
/*
* @name USBSTOR_SendInternalCdb
-*
+*
* Issues an internal SCSI request to device.
* The request is sent in a synchronous way.
*/