https://git.reactos.org/?p=reactos.git;a=commitdiff;h=493f2ace1165245b11ed6e7211ffe10a3d36334b

commit 493f2ace1165245b11ed6e7211ffe10a3d36334b
Author:     Victor Perevertkin <[email protected]>
AuthorDate: Sat Jun 13 03:07:00 2020 +0300
Commit:     Victor Perevertkin <[email protected]>
CommitDate: Sat Jun 13 03:07:00 2020 +0300

    [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++)
         {

Reply via email to