]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
comet: free queue later in comet_done(), fixes #4775
authorJaroslav Kysela <perex@perex.cz>
Fri, 8 Dec 2017 12:09:14 +0000 (13:09 +0100)
committerJaroslav Kysela <perex@perex.cz>
Fri, 8 Dec 2017 13:25:28 +0000 (14:25 +0100)
src/webui/comet.c

index 7ae2aced3554c2106f64646908b4683c3775e1b8..07a25b09e32faeb7f749ba1cfad6630b535b2ad5 100644 (file)
@@ -490,8 +490,6 @@ comet_done(void)
 
   pthread_mutex_lock(&comet_mutex);
   atomic_set(&comet_running, 0);
-  while ((cmb = LIST_FIRST(&mailboxes)) != NULL)
-    cmb_destroy(cmb);
   tvh_cond_signal(&comet_cond, 1);
   pthread_mutex_unlock(&comet_mutex);
 
@@ -504,6 +502,9 @@ comet_done(void)
 
   tvh_cond_destroy(&comet_cond);
 
+  while ((cmb = LIST_FIRST(&mailboxes)) != NULL)
+    cmb_destroy(cmb);
+
   pthread_mutex_lock(&global_lock);
   memoryinfo_unregister(&comet_memoryinfo);
   pthread_mutex_unlock(&global_lock);