fix memory leak of ic_repr_generate_json
authorMinchul Lee <slotus.lee@samsung.com>
Wed, 24 Jun 2015 11:06:50 +0000 (20:06 +0900)
committeryoungman <yman.jung@samsung.com>
Tue, 3 Nov 2015 11:06:25 +0000 (20:06 +0900)
Change-Id: Id83ccb82204310956f28093f7e77ceb05420fefd
Signed-off-by: Minchul Lee <slotus.lee@samsung.com>
lib/icl-repr.c

index 3a191bb331d5a037cafdedd829dcfcd6ce1bf6d2..fc548da3afa482986635d41ff65976b7f0e556ac 100644 (file)
@@ -414,6 +414,9 @@ char* icl_repr_generate_json(iotcon_repr_h repr, bool set_pretty)
        json_data = json_generator_to_data(gen, NULL);
        DBG("result : %s", json_data);
 
+       json_node_free(root_node);
+       g_object_unref(gen);
+
        return json_data;
 }