From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cgtn6-0006Y8-1S for barebox@lists.infradead.org; Thu, 23 Feb 2017 13:50:42 +0000 From: Sascha Hauer Date: Thu, 23 Feb 2017 14:50:07 +0100 Message-Id: <20170223135007.24317-1-s.hauer@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH] usb: gadget: fastboot: close fd after download To: Barebox List The fd for the downloaded file is never closed. Fix this. Signed-off-by: Sascha Hauer --- drivers/usb/gadget/f_fastboot.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index a6192b9ebd..974b0b32eb 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -597,6 +597,7 @@ static void rx_handler_dl_image(struct usb_ep *ep, struct usb_request *req) if (f_fb->download_bytes >= f_fb->download_size) { req->complete = rx_handler_command; req->length = EP_BUFFER_SIZE; + close(f_fb->download_fd); fastboot_tx_print(f_fb, "INFODownloading %d bytes finished", f_fb->download_bytes); -- 2.11.0 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox