From da98481109651c7f6383f06bcd715338e9cc2c79 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Mon, 15 Jun 2009 13:30:50 +0000 Subject: [PATCH] - Fix NULL pointer access in an error branch inside hub_clear_port_feature_completion(). Thanks to Christoph for testing. svn path=/trunk/; revision=41415 --- reactos/drivers/usb/nt4compat/usbdriver/hub.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/reactos/drivers/usb/nt4compat/usbdriver/hub.c b/reactos/drivers/usb/nt4compat/usbdriver/hub.c index 161eb820304..9c3436db3a9 100644 --- a/reactos/drivers/usb/nt4compat/usbdriver/hub.c +++ b/reactos/drivers/usb/nt4compat/usbdriver/hub.c @@ -762,10 +762,15 @@ hub_clear_port_feature_completion(PURB purb, PVOID context) // // do not think the device is workable, no requests to it any more. // including the int polling - // - // usb_free_mem( purb ); - // - goto LBL_SCAN_PORT_STAT; + + if (purb) + usb_free_mem(purb); + + if (port_idx) + hub_check_reset_port_status(pdev, port_idx); + + //reinitialize the int request, here to reduce some uncertainty of concurrency + hub_start_int_request(pdev); } } return;