From: Jaroslav Kysela Date: Fri, 8 Dec 2017 11:08:10 +0000 (+0100) Subject: comet: fix refcounting, fixes #4775 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cbf15d8f9f2fa7249c927d4d42f2d16871d58660;p=thirdparty%2Ftvheadend.git comet: fix refcounting, fixes #4775 --- diff --git a/src/webui/comet.c b/src/webui/comet.c index 0d3dec0cc..7ae2aced3 100644 --- a/src/webui/comet.c +++ b/src/webui/comet.c @@ -454,8 +454,8 @@ comet_mailbox_ws(http_connection_t *hc, const char *remain, void *opaque) } pthread_mutex_lock(&comet_mutex); - if (atomic_get(&comet_running)) - cmb->cmb_refcount--; + assert(cmb->cmb_refcount > 0); + cmb->cmb_refcount--; cmb->cmb_last_used = mclk(); pthread_mutex_unlock(&comet_mutex);