diff options
author | Nikias Bassen | 2019-07-19 02:15:40 +0700 |
---|---|---|
committer | Nikias Bassen | 2019-07-19 02:15:40 +0700 |
commit | e87c26ebe58aa9b778a06ebbb94659a1ef304e38 (patch) | |
tree | 21db81811cde719d7880de919e621add2e370c73 /src | |
parent | f52584e7310ad9af414cdd22cbfad81d53417c22 (diff) | |
download | libimobiledevice-e87c26ebe58aa9b778a06ebbb94659a1ef304e38.tar.gz libimobiledevice-e87c26ebe58aa9b778a06ebbb94659a1ef304e38.tar.bz2 |
syslog_relay: Terminate worker thread before freeing service client to prevent segfault
Diffstat (limited to 'src')
-rw-r--r-- | src/syslog_relay.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/syslog_relay.c b/src/syslog_relay.c index 0d71392..579908c 100644 --- a/src/syslog_relay.c +++ b/src/syslog_relay.c @@ -104,15 +104,8 @@ LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_client_free(syslog_relay_ { if (!client) return SYSLOG_RELAY_E_INVALID_ARG; - + syslog_relay_stop_capture(client); syslog_relay_error_t err = syslog_relay_error(service_client_free(client->parent)); - client->parent = NULL; - if (client->worker) { - debug_info("Joining syslog capture callback worker thread"); - thread_join(client->worker); - thread_free(client->worker); - client->worker = THREAD_T_NULL; - } free(client); return err; |