From 4b116f68860fcb2f2613983641295518d2b55fc2 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 6 Oct 2014 09:51:50 +0200 Subject: [PATCH] tvhlog: fixed thinko, add closelog() call --- src/tvhlog.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tvhlog.c b/src/tvhlog.c index 50e71fb1..21af4dc1 100644 --- a/src/tvhlog.c +++ b/src/tvhlog.c @@ -436,7 +436,7 @@ tvhlog_end ( void ) pthread_mutex_unlock(&tvhlog_mutex); pthread_join(tvhlog_tid, NULL); pthread_mutex_lock(&tvhlog_mutex); - while (!(msg = TAILQ_FIRST(&tvhlog_queue))) { + while ((msg = TAILQ_FIRST(&tvhlog_queue)) != NULL) { TAILQ_REMOVE(&tvhlog_queue, msg, link); tvhlog_process(msg, tvhlog_options, &fp, tvhlog_path); } @@ -447,4 +447,5 @@ tvhlog_end ( void ) free(tvhlog_path); htsmsg_destroy(tvhlog_debug); htsmsg_destroy(tvhlog_trace); + closelog(); }