summaryrefslogtreecommitdiff
path: root/fs/ext4/ext4_write.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2015-09-04 22:03:42 -0600
committerTom Rini <trini@konsulko.com>2015-09-11 17:15:21 -0400
commit44bfb43f9afab9b2944bb98bc0d514303f029ff9 (patch)
treeae895e7f8c96d96912525305c818cfa49b11f7c3 /fs/ext4/ext4_write.c
parent0a04ed86cfaa36d93d55016d0b3dc3f06352a2fe (diff)
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>
Diffstat (limited to 'fs/ext4/ext4_write.c')
0 files changed, 0 insertions, 0 deletions