Files
u-boot-tk1-som/drivers
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
..
2015-09-02 21:28:23 -06:00
2015-08-23 11:56:19 +02:00
2015-08-18 13:45:55 -04:00
2015-04-10 14:23:23 +02:00
2015-09-02 21:28:24 -06:00
2015-09-11 14:05:34 -04:00
2015-05-26 14:13:12 +02:00