9
0
Fork 0

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>
This commit is contained in:
Sascha Hauer 2017-02-16 14:50:04 +01:00
parent 68ba1f1536
commit fc6ce94cda
1 changed files with 1 additions and 0 deletions

View File

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