From b7309db7115241624783c7d98b97bdb995b33d27 Mon Sep 17 00:00:00 2001 From: hyunho Date: Fri, 3 Apr 2020 16:29:40 +0900 Subject: [PATCH] Fix memory leak Change-Id: Ie8c3d0fa5c260dd7ab531208e24b6f9d72199ea4 Signed-off-by: hyunho --- widget_viewer_sdk/src/main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/widget_viewer_sdk/src/main.c b/widget_viewer_sdk/src/main.c index 6d1ddac..da36cab 100644 --- a/widget_viewer_sdk/src/main.c +++ b/widget_viewer_sdk/src/main.c @@ -870,6 +870,9 @@ static void _app_control(app_control_h service, void *data) } } + if (cur_watch) + free(cur_watch); + evas_object_resize(s_info.win, s_info.w, s_info.h); watch_holder_lifecycle_st lifecycle; @@ -914,8 +917,11 @@ static void _app_control(app_control_h service, void *data) ret = app_control_is_extra_data_array(service, WIDGET_APPID, &is_array); if (is_array) { app_control_get_extra_data_array(service, WIDGET_APPID, &widget_id_arr, &array_len); - for (i = 0; i < array_len; ++i) + for (i = 0; i < array_len; ++i) { _run_widget(widget_id_arr[i], service, lazy_loader); + free(widget_id_arr[i]); + } + free(widget_id_arr); } else if (widget_id != NULL) { _run_widget(widget_id, service, lazy_loader); -- 2.7.4