diff --git a/drivers/usb/usbstor/fdo.c b/drivers/usb/usbstor/fdo.c index 15af86f095..d5652faab8 100644 --- a/drivers/usb/usbstor/fdo.c +++ b/drivers/usb/usbstor/fdo.c @@ -61,7 +61,7 @@ USBSTOR_FdoHandleDeviceRelations( } } - DeviceRelations = ExFreePoolWithTag(PagedPool, sizeof(DEVICE_RELATIONS) + (DeviceCount-1) * sizeof(PDEVICE_OBJECT), USB_STOR_TAG); + DeviceRelations = (PDEVICE_RELATIONS) ExAllocatePoolWithTag(PagedPool, sizeof(DEVICE_RELATIONS) + (DeviceCount-1) * sizeof(PDEVICE_OBJECT), USB_STOR_TAG); if (!DeviceRelations) { Irp->IoStatus.Information = 0; diff --git a/drivers/usb/usbstor/scsi.c b/drivers/usb/usbstor/scsi.c index d32aa0941c..96f712a75a 100644 --- a/drivers/usb/usbstor/scsi.c +++ b/drivers/usb/usbstor/scsi.c @@ -331,7 +331,7 @@ USBSTOR_CBWCompletionRoutine( PIRP Irp, PVOID Ctx) { - PIRP_CONTEXT Context; + //PIRP_CONTEXT Context; PIO_STACK_LOCATION IoStack; PSCSI_REQUEST_BLOCK Request; PPDO_DEVICE_EXTENSION PDODeviceExtension; @@ -344,7 +344,7 @@ USBSTOR_CBWCompletionRoutine( DPRINT("USBSTOR_CBWCompletionRoutine Irp %p Ctx %p Status %x\n", Irp, Ctx, Irp->IoStatus.Status); FDODeviceExtension = (PFDO_DEVICE_EXTENSION)Ctx; - Context = &FDODeviceExtension->CurrentIrpContext; + //Context = &FDODeviceExtension->CurrentIrpContext; IoStack = IoGetCurrentIrpStackLocation(Irp); Request = IoStack->Parameters.Scsi.Srb; PDODeviceExtension = (PPDO_DEVICE_EXTENSION)IoStack->DeviceObject->DeviceExtension;