fix memory leak issue 23/115423/1 accepted/tizen/3.0/common/20170220.130544 accepted/tizen/3.0/ivi/20170220.064845 accepted/tizen/3.0/mobile/20170220.064808 accepted/tizen/3.0/wearable/20170220.064833 submit/tizen_3.0/20170220.020607
authorKyeonghun Lee <kh9090.lee@samsung.com>
Mon, 20 Feb 2017 02:01:29 +0000 (11:01 +0900)
committerKyeonghun Lee <kh9090.lee@samsung.com>
Mon, 20 Feb 2017 02:01:29 +0000 (11:01 +0900)
Change-Id: I7bd8ade3555eac270d2c63d69a3f70e7493ce787
Signed-off-by: Kyeonghun Lee <kh9090.lee@samsung.com>
utils/MsgJsonParser.cpp

index 6fce3d8..96cfebe 100755 (executable)
@@ -45,7 +45,7 @@ msg_json_gen_object* msg_json_gen_new_obj(msg_json_gen_type type)
 
                if (new_obj == NULL) {
                        if (type == MSG_JSON_GEN_OBJECT)
-                               json_object_ref((JsonObject *)json_value);
+                               json_object_unref((JsonObject *)json_value);
                        else if (type == MSG_JSON_GEN_ARRAY)
                                json_array_unref((JsonArray *)json_value);
 
@@ -66,7 +66,7 @@ void msg_json_gen_free_obj(msg_json_gen_object *obj)
        }
        if (obj->value != NULL) {
                if (obj->type == MSG_JSON_GEN_OBJECT)
-                       json_object_ref((JsonObject *)obj->value);
+                       json_object_unref((JsonObject *)obj->value);
                else if (obj->type == MSG_JSON_GEN_ARRAY)
                        json_array_unref((JsonArray *)obj->value);