diff options
author | William Wilgus <wilgus.william@gmail.com> | 2022-10-15 09:08:09 -0400 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2022-10-15 09:26:58 -0400 |
commit | 12ef045fdf5a9e2b4d5618cc3b7ba50ecc0ccf69 (patch) | |
tree | b4885951a5cba1b78c21b30ce37a1d6f1574aa5f /firmware/usbstack/usb_storage.c | |
parent | 9d3d925295112a0080bc1d70fad170db9e1af2a9 (diff) | |
download | rockbox-12ef045fdf5a9e2b4d5618cc3b7ba50ecc0ccf69.tar.gz rockbox-12ef045fdf5a9e2b4d5618cc3b7ba50ecc0ccf69.zip |
move buflib_free invalid handle check to the function
allow buflib_free to check for invalid or already freed handles
within the function -- remove all the invalid handle guards thru core_free
Change-Id: Ibdcbc82760fc93b674c42283fca420d94907df8e
Diffstat (limited to 'firmware/usbstack/usb_storage.c')
-rw-r--r-- | firmware/usbstack/usb_storage.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/firmware/usbstack/usb_storage.c b/firmware/usbstack/usb_storage.c index eb82f72eae..08b1f0b7e7 100644 --- a/firmware/usbstack/usb_storage.c +++ b/firmware/usbstack/usb_storage.c | |||
@@ -481,8 +481,7 @@ void usb_storage_init_connection(void) | |||
481 | 481 | ||
482 | void usb_storage_disconnect(void) | 482 | void usb_storage_disconnect(void) |
483 | { | 483 | { |
484 | if (usb_handle > 0) | 484 | usb_handle = core_free(usb_handle); |
485 | usb_handle = core_free(usb_handle); | ||
486 | } | 485 | } |
487 | 486 | ||
488 | /* called by usb_core_transfer_complete() */ | 487 | /* called by usb_core_transfer_complete() */ |