util: json-config: Remove unneeded json_object_put() to prevent dobule free 43/317243/1 accepted/tizen_unified_dev accepted/tizen_unified_toolchain accepted/tizen/9.0/unified/20241030.233029 accepted/tizen/unified/20240910.112402 accepted/tizen/unified/dev/20240913.055521 accepted/tizen/unified/toolchain/20241004.101634 accepted/tizen/unified/x/20240911.015710 accepted/tizen/unified/x/asan/20241013.235953 tizen_9.0_m2_release
authorChanwoo Choi <cw00.choi@samsung.com>
Fri, 6 Sep 2024 01:35:19 +0000 (10:35 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Fri, 6 Sep 2024 06:37:32 +0000 (15:37 +0900)
json_object_new_object() doesn't require the json_object_put()

Change-Id: I52c3cd52b7be0c53b8356f913b1fb6e8af71e3a4
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
src/util/json-config.c

index fa9b390833ac593588c158b68df6c6889adbc61d..eb88a222030752f418cce2f7d783957330fb8311 100644 (file)
@@ -257,7 +257,6 @@ static int load_multidir_config(const char *path, struct json_object *c)
                ret = assemble_config_from_dir(dir_path, obj_config);
                if (ret < 0) {
                        log_error("Unable to assemble config for object %s", obj_name);
-                       json_object_put(obj_config);
                        goto error;
                }
        }