]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
extjs: coverity fixes
authorJaroslav Kysela <perex@perex.cz>
Fri, 3 Oct 2014 19:44:11 +0000 (21:44 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 3 Oct 2014 19:44:11 +0000 (21:44 +0200)
src/webui/extjs.c

index be2c742cc2773ac39e0cf5dfebf3af77897529d1..cf155825f316c31e9f3c6f7f50b6938ad2d95766 100755 (executable)
@@ -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 */