Fix memory leak of object dump list 98/121198/1 accepted/tizen/unified/20170406.054112 submit/tizen/20170405.010045
authorSuyeon Hwang <stom.hwang@samsung.com>
Mon, 27 Mar 2017 08:13:09 +0000 (17:13 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Mon, 27 Mar 2017 08:13:09 +0000 (17:13 +0900)
Change-Id: I1400d2816da12b302694e6a890bdd6f52f16308b
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
src/vc_elm_core.c
src/vc_elm_efl_dump.c

index 581efb3..a7525a3 100644 (file)
@@ -637,6 +637,11 @@ void _vc_elm_core_fini()
        }
        _vc_elm_core_destroy_xml_data();
 
+       if (NULL != g_dump_list) {
+               ea_object_dump_list_clear();
+               g_dump_list = NULL;
+       }
+
 #ifndef SRPOL_DEBUG
        _vc_elm_widget_wrapper_deinitialize();
 #endif
index c4f6b36..8cdfc20 100644 (file)
@@ -741,12 +741,21 @@ void
 ea_object_dump_list_clear(void)
 {
        Object_Info *obj_info = NULL;
-       EINA_LIST_FREE(ret_list, obj_info)
+       EINA_LIST_FREE(ret_list, obj_info) {
+               if (!obj_info->type) free(obj_info->type);
+               if (!obj_info->edje_file) free(obj_info->edje_file);
+               if (!obj_info->group) free(obj_info->group);
+               if (!obj_info->image_name) free(obj_info->image_name);
+               if (!obj_info->color_class) free(obj_info->color_class);
+               if (!obj_info->part_name) free(obj_info->part_name);
+               if (!obj_info->part_state) free(obj_info->part_state);
+               if (!obj_info->text) free(obj_info->text);
                free(obj_info);
-
+       }
        ret_list = NULL;
 }
 
+
 Eina_List*
 ea_object_dump_full_list_get(Eina_Bool exclude_unfocusable_text)
 {