From 493f2ace1165245b11ed6e7211ffe10a3d36334b Mon Sep 17 00:00:00 2001 From: Victor Perevertkin Date: Sat, 13 Jun 2020 03:07:00 +0300 Subject: [PATCH] [USBSTOR] Fix wrong function name in a9b97ae --- drivers/usb/usbstor/fdo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/usbstor/fdo.c b/drivers/usb/usbstor/fdo.c index 15af86f095a..ebf2d1976a4 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 = ExAllocatePoolWithTag(PagedPool, sizeof(DEVICE_RELATIONS) + (DeviceCount - 1) * sizeof(PDEVICE_OBJECT), USB_STOR_TAG); if (!DeviceRelations) { Irp->IoStatus.Information = 0; @@ -70,6 +70,8 @@ USBSTOR_FdoHandleDeviceRelations( return STATUS_INSUFFICIENT_RESOURCES; } + DeviceRelations->Count = 0; + // add device objects for (Index = 0; Index < max(DeviceExtension->MaxLUN, 1); Index++) {