usb: gadget: f_thor: Free the allocated out request buffer

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>
This commit is contained in:
Siva Durga Prasad Paladugu authored and Marek Vasut committed 2017-07-28 23:34:38 +02:00
1 parent 78e3098752
commit bab0146ea9
1 file changed
+1
+1
View 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);