Author: tfaber
Date: Sat Aug 27 11:29:42 2016
New Revision: 72471
URL:
http://svn.reactos.org/svn/reactos?rev=72471&view=rev
Log:
[USBHUB]
- Fix memory leaks in failure case of CreateUsbChildDeviceObject. Patch by Vardan
Mikayelyan, merged from r72366.
Modified:
trunk/reactos/ (props changed)
trunk/reactos/drivers/usb/usbhub/ (props changed)
trunk/reactos/drivers/usb/usbhub/fdo.c
Propchange: trunk/reactos/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Aug 27 11:29:42 2016
@@ -1,6 +1,7 @@
/branches/GSoC_2011/GSoC_Network:51548
/branches/GSoC_2011/GSoC_TcpIpDriver:51550
/branches/GSoC_2011/TcpIpDriver:51551-53074,53076-53119
+/branches/GSoC_2016/USB:72366
/branches/GSoC_Network:51545-51546
/branches/cmake-bringup:50484,50693,50719,51544-52564
/branches/condrv_restructure:63104-65657
Propchange: trunk/reactos/drivers/usb/usbhub/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Aug 27 11:29:42 2016
@@ -4,6 +4,7 @@
/branches/GSoC_2011/GSoC_TcpIpDriver/drivers/usb/usbhub_new:51550
/branches/GSoC_2011/TcpIpDriver/drivers/usb/usbhub:51551-53074,53076-53119
/branches/GSoC_2011/TcpIpDriver/drivers/usb/usbhub_new:51551-53074,53076-53119
+/branches/GSoC_2016/USB/drivers/usb/usbhub:72366
/branches/GSoC_Network/drivers/usb/usbhub:51545-51546
/branches/GSoC_Network/drivers/usb/usbhub_new:51545-51546
/branches/cmake-bringup/drivers/usb/usbhub:50484,50693,50719,51544-52564
Modified: trunk/reactos/drivers/usb/usbhub/fdo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbhub/fdo.c?r…
==============================================================================
--- trunk/reactos/drivers/usb/usbhub/fdo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbhub/fdo.c [iso-8859-1] Sat Aug 27 11:29:42 2016
@@ -1358,6 +1358,21 @@
//
if (UsbChildExtension->FullConfigDesc)
ExFreePool(UsbChildExtension->FullConfigDesc);
+
+ //
+ // Free ID buffers if they were allocated in CreateDeviceIds()
+ //
+ if (UsbChildExtension->usCompatibleIds.Buffer)
+ ExFreePool(UsbChildExtension->usCompatibleIds.Buffer);
+
+ if (UsbChildExtension->usDeviceId.Buffer)
+ ExFreePool(UsbChildExtension->usDeviceId.Buffer);
+
+ if (UsbChildExtension->usHardwareIds.Buffer)
+ ExFreePool(UsbChildExtension->usHardwareIds.Buffer);
+
+ if (UsbChildExtension->usInstanceId.Buffer)
+ ExFreePool(UsbChildExtension->usInstanceId.Buffer);
//
// Delete the device object