diff options
| author | 2020-07-06 14:05:23 +0200 | |
|---|---|---|
| committer | 2020-07-06 14:05:23 +0200 | |
| commit | ce1d31fe7766f215fecdf4e2b3919efd1834c581 (patch) | |
| tree | 8db9e0b541360e6ead3373078026cd885c893b77 /src/libirecovery.c | |
| parent | fbcfbf2cd6af29d05fdb17e129bb8db7a2253bd7 (diff) | |
| download | libirecovery-ce1d31fe7766f215fecdf4e2b3919efd1834c581.tar.gz libirecovery-ce1d31fe7766f215fecdf4e2b3919efd1834c581.tar.bz2 | |
linux/libusb: Break out of loop when device is found in irecv_open_with_ecid() and make sure device list is always free'd properly
Thanks to tihmstar for pointing this out.
Diffstat (limited to 'src/libirecovery.c')
| -rw-r--r-- | src/libirecovery.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libirecovery.c b/src/libirecovery.c index db1b118..d36234f 100644 --- a/src/libirecovery.c +++ b/src/libirecovery.c | |||
| @@ -1405,13 +1405,12 @@ IRECV_API irecv_error_t irecv_open_with_ecid(irecv_client_t* pclient, unsigned l | |||
| 1405 | } | 1405 | } |
| 1406 | 1406 | ||
| 1407 | *pclient = client; | 1407 | *pclient = client; |
| 1408 | |||
| 1409 | libusb_free_device_list(usb_device_list, 1); | ||
| 1410 | |||
| 1411 | ret = IRECV_E_SUCCESS; | 1408 | ret = IRECV_E_SUCCESS; |
| 1409 | break; | ||
| 1412 | } | 1410 | } |
| 1413 | } | 1411 | } |
| 1414 | } | 1412 | } |
| 1413 | libusb_free_device_list(usb_device_list, 1); | ||
| 1415 | #endif | 1414 | #endif |
| 1416 | #else | 1415 | #else |
| 1417 | ret = mobiledevice_connect(pclient, ecid); | 1416 | ret = mobiledevice_connect(pclient, ecid); |
