Skip to content

Commit ce01b38

Browse files
committed
usb: hub: fdo: Fixes in cleanup of CreateUsbChildDeviceObject()
svn path=/branches/GSoC_2016/USB/; revision=72366
1 parent 222c77d commit ce01b38

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

drivers/usb/usbhub/fdo.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,6 +1360,21 @@ CreateUsbChildDeviceObject(
13601360
if (UsbChildExtension->FullConfigDesc)
13611361
ExFreePool(UsbChildExtension->FullConfigDesc);
13621362

1363+
//
1364+
// Free ID buffers if they were allocated in CreateDeviceIds()
1365+
//
1366+
if (UsbChildExtension->usCompatibleIds.Buffer)
1367+
ExFreePool(UsbChildExtension->usCompatibleIds.Buffer);
1368+
1369+
if (UsbChildExtension->usDeviceId.Buffer)
1370+
ExFreePool(UsbChildExtension->usDeviceId.Buffer);
1371+
1372+
if (UsbChildExtension->usHardwareIds.Buffer)
1373+
ExFreePool(UsbChildExtension->usHardwareIds.Buffer);
1374+
1375+
if (UsbChildExtension->usInstanceId.Buffer)
1376+
ExFreePool(UsbChildExtension->usInstanceId.Buffer);
1377+
13631378
//
13641379
// Delete the device object
13651380
//

0 commit comments

Comments
 (0)