patch "usb: gadget: function: printer: Fix a memory leak for interface" added to usb-linus
Subsystems (2)
This is a note to let you know that I've just added the patch titled
usb: gadget: function: printer: Fix a memory leak for interface
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
From 2cc332e4ee4febcbb685e2962ad323fe4b3b750a Mon Sep 17 00:00:00 2001
From: Zqiang <[email protected]>
Date: Thu, 10 Dec 2020 10:01:48 +0800
Subject: usb: gadget: function: printer: Fix a memory leak for interface
descriptor
When printer driver is loaded, the printer_func_bind function is called, in this function, the interface descriptor be allocated memory, if after that, the error occurred, the interface descriptor memory need to be free.
--- drivers/usb/gadget/function/f_printer.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/gadget/function/f_printer.c +1 -0
@@ -1162,6 +1162,7 @@ static int printer_func_bind(struct usb_configuration *c,printer_req_free (dev->in_ep, req); } +usb_free_all_descriptors (f);return ret; }
Signature · 1 line
2.29.2