mirror of
https://github.com/reactos/reactos.git
synced 2025-05-25 12:14:32 +00:00
[USBHUB]
- Fix memory leaks in failure case of CreateUsbChildDeviceObject. Patch by Vardan Mikayelyan, merged from r72366. svn path=/trunk/; revision=72471
This commit is contained in:
parent
c064e95689
commit
5c207cc611
1 changed files with 15 additions and 0 deletions
|
@ -1359,6 +1359,21 @@ Cleanup:
|
|||
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
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue