From: Jaroslav Kysela Date: Sat, 19 Sep 2015 19:03:36 +0000 (+0200) Subject: tvhlog: fix the wrong mutex, fixes #3093 X-Git-Tag: v4.2.1~2092 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9de43dcf38caa63f270aa69dc69abd9115330eea;p=thirdparty%2Ftvheadend.git tvhlog: fix the wrong mutex, fixes #3093 --- diff --git a/src/tvhlog.c b/src/tvhlog.c index fc42d5713..d66619863 100644 --- a/src/tvhlog.c +++ b/src/tvhlog.c @@ -467,14 +467,14 @@ tvhlog_class_path_set ( void *o, const void *v ) { const char *s = v; if (strcmp(s ?: "", tvhlog_path ?: "")) { - pthread_mutex_unlock(&tvhlog_mutex); + pthread_mutex_lock(&tvhlog_mutex); free(tvhlog_path); tvhlog_path = strdup(s ?: ""); if (tvhlog_path && tvhlog_path[0]) tvhlog_options |= TVHLOG_OPT_DBG_FILE; else tvhlog_options &= ~TVHLOG_OPT_DBG_FILE; - pthread_mutex_lock(&tvhlog_mutex); + pthread_mutex_unlock(&tvhlog_mutex); return 1; } return 0;