diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2017-02-16 14:50:04 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-02-23 14:49:52 +0100 |
commit | fc6ce94cdae01776b995496ec7286e46705108e9 (patch) | |
tree | a2bd16d3d1f4bb288cd232029e2b515fd29533f8 /drivers | |
parent | 68ba1f1536d717b8e0036c6775ffe2485e8425c4 (diff) | |
download | barebox-fc6ce94cdae01776b995496ec7286e46705108e9.tar.gz barebox-fc6ce94cdae01776b995496ec7286e46705108e9.tar.xz |
usb: gadget: fastboot: close fd after download
The fd for the downloaded file is never closed. Fix this.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/gadget/f_fastboot.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); |