diff options
| author | 2026-11-24 19:10:00 +0100 | |
|---|---|---|
| committer | 2026-11-24 19:10:00 +0100 | |
| commit | a33fc5067c95f9fb2eeabe854c068e1c46032feb (patch) | |
| tree | 16ecc7bba8f5520786d9f312ecfa2a1278beb7df | |
| parent | 4bc251f4983610e4cfb2bfaafbe731f1acab9df5 (diff) | |
| download | libirecovery-a33fc5067c95f9fb2eeabe854c068e1c46032feb.tar.gz libirecovery-a33fc5067c95f9fb2eeabe854c068e1c46032feb.tar.bz2 | |
Fix IOKit handle leak when creating the async event source fails
Use irecv_close() instead of free() so the device handle is released.
| -rw-r--r-- | src/libirecovery.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libirecovery.c b/src/libirecovery.c index a8ebc46..b1e6447 100644 --- a/src/libirecovery.c +++ b/src/libirecovery.c @@ -2016,7 +2016,7 @@ irecv_error_t irecv_open_with_ecid(irecv_client_t* pclient, uint64_t ecid) #ifdef HAVE_IOKIT error = (*client->handle)->CreateDeviceAsyncEventSource(client->handle, &client->async_event_source); if (error != IRECV_E_SUCCESS) { - free(client); + irecv_close(client); *pclient = NULL; return error; } |
