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 2016-06-21 14:50:48 +02:00 committed by Marek Vasut
parent 78e3098752
commit bab0146ea9

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);