From cdc67e5a997d08158bcb24d51ca991838106bc7e Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Thu, 2 Oct 2014 00:48:43 +0200 Subject: Don't call libusb_exit() in irecv_open_with_ecid() on error The helper might be used multiple times and the library should not cause deinitialization of libusb before the user calls irecv_exit(). --- src/libirecovery.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/libirecovery.c') 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; } -- cgit v1.1-32-gdbae