Patch "usb: gadget: configs: plug memory leak" has been added to the 4.4-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
usb: gadget: configs: plug memory leak
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
usb-gadget-configs-plug-memory-leak.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Tue Dec 12 13:38:50 CET 2017
From: John Keeping <[email protected]>
Date: Tue, 28 Feb 2017 10:55:30 +0000
Subject: usb: gadget: configs: plug memory leak
From: John Keeping <[email protected]>
[ 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.
--- drivers/usb/gadget/configfs.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/gadget/configfs.c +1 -0
@@ -270,6 +270,7 @@ static ssize_t gadget_dev_desc_UDC_store ret =unregister_gadget (gi);if (ret) goto err; +kfree (name); }else {if (gi->udc_name) { ret = -EBUSY ;
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/usb-gadget-configs-plug-memory-leak.patch