]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
SAT>IP client: fix possible inverted locking (clang sanitizer)
authorJaroslav Kysela <perex@perex.cz>
Fri, 25 Mar 2016 19:30:31 +0000 (20:30 +0100)
committerJaroslav Kysela <perex@perex.cz>
Fri, 25 Mar 2016 19:30:31 +0000 (20:30 +0100)
src/input/mpegts/satip/satip_frontend.c

index 68a2dc8ea80cebc8146f53b01611aea4c766102f..dab617c941aced33e514955ef3802ea6cd6c83b1 100644 (file)
@@ -1035,10 +1035,12 @@ satip_frontend_wake_other_waiting( satip_frontend_t *lfe )
     lfe = TAILQ_FIRST(&sd->sd_serialize_queue);
     if (lfe != NULL) {
       tvhtrace("satip", "wake other waiting: %s", lfe->mi_name);
+      pthread_mutex_unlock(&sd->sd_tune_mutex);
       pthread_mutex_lock(&lfe->sf_dvr_lock);
       if (lfe->sf_running)
         tvh_write(lfe->sf_dvr_pipe.wr, "o", 1);
       pthread_mutex_unlock(&lfe->sf_dvr_lock);
+      return;
     }
   }
   pthread_mutex_unlock(&sd->sd_tune_mutex);