[PATCH] usb: gadget: fastboot: close fd after download

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux