]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
usb: gadget: f_thor: Free the allocated out request buffer
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Tue, 21 Jun 2016 12:50:48 +0000 (14:50 +0200)
committerMarek Vasut <marex@denx.de>
Fri, 28 Jul 2017 21:34:38 +0000 (23:34 +0200)
Fix the memory leak by freeing the allocated out request buffer

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/usb/gadget/f_thor.c

index a60e9487e7746d62a98d8aa04db11a335aeb9f9c..cd4d9e659a39bb7b205a1898531194c71901c439 100644 (file)
@@ -891,6 +891,7 @@ static void thor_func_disable(struct usb_function *f)
        }
 
        if (dev->out_ep->driver_data) {
+               free(dev->out_req->buf);
                dev->out_req->buf = NULL;
                usb_ep_free_request(dev->out_ep, dev->out_req);
                usb_ep_disable(dev->out_ep);