summaryrefslogtreecommitdiffstats
path: root/src/libirecovery.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libirecovery.c')
-rw-r--r--src/libirecovery.c2
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;
}