Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
extjs: fix wrong code path in extjs_tvhlog() - coverity
  • Loading branch information
perexg committed Oct 3, 2014
1 parent 3383573 commit 297c79c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/webui/extjs.c
Expand Up @@ -580,6 +580,10 @@ extjs_tvhlog(http_connection_t *hc, const char *remain, void *opaque)
/* Get config */
pthread_mutex_lock(&tvhlog_mutex);
m = htsmsg_create_map();
if (!m) {
pthread_mutex_unlock(&tvhlog_mutex);
return HTTP_STATUS_BAD_REQUEST;
}
htsmsg_add_u32(m, "tvhlog_level", tvhlog_level);
htsmsg_add_u32(m, "tvhlog_trace_on", tvhlog_level > LOG_DEBUG);
tvhlog_get_trace(str, sizeof(str));
Expand All @@ -592,7 +596,6 @@ extjs_tvhlog(http_connection_t *hc, const char *remain, void *opaque)
tvhlog_options & TVHLOG_OPT_DBG_SYSLOG);
pthread_mutex_unlock(&tvhlog_mutex);

if (!m) return HTTP_STATUS_BAD_REQUEST;
out = json_single_record(m, "config");

/* Save settings */
Expand Down

0 comments on commit 297c79c

Please sign in to comment.