common: always va_end(ap) on error before bailing out.
authorKrisztian Litkey <krisztian.litkey@intel.com>
Thu, 6 Nov 2014 12:40:47 +0000 (14:40 +0200)
committerKrisztian Litkey <krisztian.litkey@intel.com>
Thu, 6 Nov 2014 13:21:01 +0000 (15:21 +0200)
src/common/json.c

index 69a412a..c275330 100644 (file)
@@ -219,7 +219,7 @@ mrp_json_t *mrp_json_add_array(mrp_json_t *o, const char *key,
     a   = mrp_json_create(MRP_JSON_ARRAY);
 
     if (a == NULL)
-        return NULL;
+        goto fail;
 
     switch (type) {
     case MRP_JSON_STRING: