[Wine-patches] [eterhack 2/2] mountmgr.sys: Don't free IRP after IoCallDriver. (eterbug #10621)

Dmitry Timoshkov dtimoshkov на etersoft.ru
Вт Ноя 10 11:33:02 MSK 2015


Every driver always calls IoCompleteRequest once the request has been
processed, and IoCompleteRequest is supposed to free IRP on its own.
---
 dlls/mountmgr.sys/usbhub.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/dlls/mountmgr.sys/usbhub.c b/dlls/mountmgr.sys/usbhub.c
index 3abec7d..b60e4b7 100644
--- a/dlls/mountmgr.sys/usbhub.c
+++ b/dlls/mountmgr.sys/usbhub.c
@@ -1900,7 +1900,6 @@ static NTSTATUS call_pnp_func( DEVICE_OBJECT *device, UCHAR minor_func )
     DRIVER_OBJECT *driver = device->DriverObject;
     IO_STACK_LOCATION *irpsp;
     PIRP irp;
-    NTSTATUS status;
 
     if (driver->MajorFunction[IRP_MJ_PNP] == NULL)
         return STATUS_NOT_SUPPORTED;
@@ -1914,9 +1913,7 @@ static NTSTATUS call_pnp_func( DEVICE_OBJECT *device, UCHAR minor_func )
     irpsp->MinorFunction = minor_func;
     irpsp->DeviceObject = device;
     device->CurrentIrp = irp;
-    status = IoCallDriver( device, irp );
-    IoFreeIrp( irp );
-    return status;
+    return IoCallDriver( device, irp );
 }
 
 static void stop_device_driver( struct DeviceInstance *instance )
-- 
2.6.3



Подробная информация о списке рассылки Wine-patches