diff options
-rw-r--r-- | src/libirecovery.c | 2 | ||||
-rw-r--r-- | tools/irecovery.c | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/src/libirecovery.c b/src/libirecovery.c index 83ceefd..99143cb 100644 --- a/src/libirecovery.c +++ b/src/libirecovery.c @@ -767,7 +767,6 @@ irecv_error_t irecv_open_with_ecid(irecv_client_t* pclient, unsigned long long e continue; } libusb_free_device_list(usb_device_list, 1); - libusb_exit(libirecovery_context); return IRECV_E_UNABLE_TO_CONNECT; } @@ -775,7 +774,6 @@ irecv_error_t irecv_open_with_ecid(irecv_client_t* pclient, unsigned long long e if (client == NULL) { libusb_free_device_list(usb_device_list, 1); libusb_close(usb_handle); - libusb_exit(libirecovery_context); return IRECV_E_OUT_OF_MEMORY; } diff --git a/tools/irecovery.c b/tools/irecovery.c index 9c153d8..1b1386a 100644 --- a/tools/irecovery.c +++ b/tools/irecovery.c @@ -518,6 +518,7 @@ int main(int argc, char* argv[]) { } irecv_close(client); + irecv_exit(); return 0; } |