From cf8cf94c55b6fdbbb5e97442e5ac24c580c62ae8 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Fri, 3 Oct 2014 21:44:11 +0200 Subject: [PATCH] extjs: coverity fixes --- src/webui/extjs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/webui/extjs.c b/src/webui/extjs.c index be2c742c..cf155825 100755 --- a/src/webui/extjs.c +++ b/src/webui/extjs.c @@ -485,6 +485,10 @@ extjs_config(http_connection_t *hc, const char *remain, void *opaque) /* Misc */ pthread_mutex_lock(&global_lock); m = config_get_all(); + if (!m) { + pthread_mutex_unlock(&global_lock); + return HTTP_STATUS_BAD_REQUEST; + } /* Time */ htsmsg_add_u32(m, "tvhtime_update_enabled", tvhtime_update_enabled); @@ -498,7 +502,6 @@ extjs_config(http_connection_t *hc, const char *remain, void *opaque) pthread_mutex_unlock(&global_lock); - if (!m) return HTTP_STATUS_BAD_REQUEST; out = json_single_record(m, "config"); /* Save settings */