usb: gadget: configs: plug memory leak
authorJohn Keeping <john@metanate.com>
Tue, 28 Feb 2017 10:55:30 +0000 (10:55 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Dec 2017 08:28:18 +0000 (09:28 +0100)
commit59682e70c98054eb8f97e3670625992a0c85d24e
tree8d4210ee708d7cf6b9400e04044edb2306e65332
parent881b5d4841fc0d37d0d7362182d0819db927b712
usb: gadget: configs: plug memory leak

[ Upstream commit 38355b2a44776c25b0f2ad466e8c51bb805b3032 ]

When binding a gadget to a device, "name" is stored in gi->udc_name, but
this does not happen when unregistering and the string is leaked.

Signed-off-by: John Keeping <john@metanate.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/configfs.c