u-boot-brain/drivers/usb
Stephen Warren 44bfb43f9a usb: gadget: don't leak configs when unbinding
By the time g_dnl_unbind() is run, cdev->config has been set to NULL,
so the free() there does nothing, and the config struct is leaked.
Equally, struct usb_gadget contains a linked list of config structs, so
the code should iterate over them all and free each one, rather than
freeing one particular config struct.

composite_unbind() already iterates over the list of config structs, and
unlinks each from the linked list. Fix this loop to free() each struct as
it's unlinked and otherwise forgotten.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
2015-09-11 17:15:21 -04:00
..
dwc3 TI PHY: Add support to control 2nd USB PHY in DRA7xx/AM57xx 2015-08-28 12:33:20 -04:00
emul dm: usb: Add a terminator to the string destructor list 2015-04-22 11:13:24 -06:00
eth Move ALLOC_CACHE_ALIGN_BUFFER() to the new memalign.h header 2015-09-11 17:15:20 -04:00
gadget usb: gadget: don't leak configs when unbinding 2015-09-11 17:15:21 -04:00
host Move ALLOC_CACHE_ALIGN_BUFFER() to the new memalign.h header 2015-09-11 17:15:20 -04:00
musb usb: musb-new: CONFIG_MUSB prefix replacement with CONFIG_USB_MUSB 2015-08-05 17:20:34 +02:00
musb-new sunxi: musb: Drop no longer accurate comment in Kconfig help text 2015-08-31 08:43:41 +02:00
phy usb: xhci: omap: Remove common dwc3 drv functions calls 2015-07-22 08:55:44 +02:00
ulpi drivers: usb: convert makefiles to Kbuild style 2013-10-31 13:25:38 -04:00
Kconfig usb: musb-new: Kconfig support for USB_MUSB_HOST and USB_MUSB_GADGET 2015-08-05 17:20:34 +02:00