mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] usb: gadget: fastboot: close fd after download
@ 2017-02-23 13:50 Sascha Hauer
  0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2017-02-23 13:50 UTC (permalink / raw)
  To: Barebox List

The fd for the downloaded file is never closed. Fix this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-02-23 13:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-23 13:50 [PATCH] usb: gadget: fastboot: close fd after download Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox