summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2019-07-19 02:21:51 +0700
committerGravatar Nikias Bassen2019-07-19 02:21:51 +0700
commit98ac7da5255a69fa4620e325228a1c7d79ba42d7 (patch)
tree09b2c8ddc9f9336276d90c2e667da20d626a5c46 /src
parente87c26ebe58aa9b778a06ebbb94659a1ef304e38 (diff)
downloadlibimobiledevice-98ac7da5255a69fa4620e325228a1c7d79ba42d7.tar.gz
libimobiledevice-98ac7da5255a69fa4620e325228a1c7d79ba42d7.tar.bz2
installation_proxy: Terminate worker thread before freeing property list service client to prevent segfault
Diffstat (limited to 'src')
-rw-r--r--src/installation_proxy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/installation_proxy.c b/src/installation_proxy.c
index 7c2d336..9a6f1ab 100644
--- a/src/installation_proxy.c
+++ b/src/installation_proxy.c
@@ -261,7 +261,7 @@ LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_free(instproxy_client_t
if (!client)
return INSTPROXY_E_INVALID_ARG;
- property_list_service_client_free(client->parent);
+ property_list_service_client_t parent = client->parent;
client->parent = NULL;
if (client->receive_status_thread) {
debug_info("joining receive_status_thread");
@@ -269,6 +269,7 @@ LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_free(instproxy_client_t
thread_free(client->receive_status_thread);
client->receive_status_thread = THREAD_T_NULL;
}
+ property_list_service_client_free(parent);
mutex_destroy(&client->mutex);
free(client);