]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
capmt: change the lock order (clang sanitizer)
authorJaroslav Kysela <perex@perex.cz>
Tue, 8 Mar 2016 19:54:31 +0000 (20:54 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 8 Mar 2016 19:54:31 +0000 (20:54 +0100)
src/descrambler/capmt.c

index 796f405fda6949e0ffef9a83eb3522c5d21368d1..5a72232609148e889ce8a4e580118a62eb1c8c85 100644 (file)
@@ -2098,8 +2098,8 @@ capmt_service_start(caclient_t *cac, service_t *s)
     tuner = lfe->lfe_adapter->la_dvb_number;
 #endif
 
-  pthread_mutex_lock(&t->s_stream_mutex);
   pthread_mutex_lock(&capmt->capmt_mutex);
+  pthread_mutex_lock(&t->s_stream_mutex);
 
   LIST_FOREACH(ct, &capmt->capmt_services, ct_link)
     /* skip, if we already have this service */
@@ -2199,8 +2199,8 @@ capmt_service_start(caclient_t *cac, service_t *s)
   tvh_cond_signal(&capmt->capmt_cond, 0);
 
 fin:
-  pthread_mutex_unlock(&capmt->capmt_mutex);
   pthread_mutex_unlock(&t->s_stream_mutex);
+  pthread_mutex_unlock(&capmt->capmt_mutex);
 
   if (change)
     capmt_notify_server(capmt, NULL, 0);