VirtualBox

Ignore:
Timestamp:
Oct 6, 2015 8:13:01 AM (9 years ago)
Author:
vboxsync
Message:

USB/Win: Do not leak memory if request fails.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbRt.cpp

    r57896 r58036  
    831831            {
    832832                AssertMsgFailed((__FUNCTION__": VBoxUsbToolUrbPost failed Status (0x%x) usb Status (0x%x)\n", Status, pUrb->UrbHeader.Status));
     833                /* Free up the allocated memory. */
     834                vboxUsbMemFree(pDevExt->Rt.pVBIfaceInfo[InterfaceNumber].pInterfaceInfo);
     835                pDevExt->Rt.pVBIfaceInfo[InterfaceNumber].pInterfaceInfo = NULL;
     836                if (pDevExt->Rt.pVBIfaceInfo[InterfaceNumber].pPipeInfo)
     837                {
     838                    vboxUsbMemFree(pDevExt->Rt.pVBIfaceInfo[InterfaceNumber].pPipeInfo);
     839                    pDevExt->Rt.pVBIfaceInfo[InterfaceNumber].pPipeInfo = NULL;
     840                }
    833841            }
    834842        }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette