diff options
author | Nikias Bassen | 2019-07-19 02:21:51 +0700 |
---|---|---|
committer | Nikias Bassen | 2019-07-19 02:21:51 +0700 |
commit | 98ac7da5255a69fa4620e325228a1c7d79ba42d7 (patch) | |
tree | 09b2c8ddc9f9336276d90c2e667da20d626a5c46 | |
parent | e87c26ebe58aa9b778a06ebbb94659a1ef304e38 (diff) | |
download | libimobiledevice-98ac7da5255a69fa4620e325228a1c7d79ba42d7.tar.gz libimobiledevice-98ac7da5255a69fa4620e325228a1c7d79ba42d7.tar.bz2 |
installation_proxy: Terminate worker thread before freeing property list service client to prevent segfault
-rw-r--r-- | src/installation_proxy.c | 3 |
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); |