diff --git a/src/descrambler/capmt.c b/src/descrambler/capmt.c index 897b614c..382223f1 100644 --- a/src/descrambler/capmt.c +++ b/src/descrambler/capmt.c @@ -1775,6 +1775,7 @@ capmt_destroy(capmt_t *capmt) TAILQ_REMOVE(&capmts, capmt, capmt_link); capmt->capmt_running = 0; pthread_cond_signal(&capmt->capmt_cond); + pthread_mutex_unlock(&global_lock); pthread_join(capmt->capmt_tid, NULL); free(capmt->capmt_sockfile); capmt->capmt_sockfile = NULL; @@ -1784,6 +1785,7 @@ capmt_destroy(capmt_t *capmt) capmt->capmt_oscam, capmt->capmt_oscam == CAPMT_OSCAM_TCP ? "IP address" : "sockfile", capmt->capmt_sockfile, capmt->capmt_port); + pthread_mutex_lock(&global_lock); } /**