From dbb42b424b66d956d1243b2da764ebb27c3e93dc Mon Sep 17 00:00:00 2001 From: Hosang Kim Date: Tue, 17 Mar 2020 04:12:19 +0000 Subject: [PATCH] win/widget: free array when object is deleted. It makes a memory leak. Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D11522 --- src/lib/elementary/efl_ui_widget.c | 5 +++++ src/lib/elementary/efl_ui_win.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c index 4dee0af1ab..3c114f6c69 100644 --- a/src/lib/elementary/efl_ui_widget.c +++ b/src/lib/elementary/efl_ui_widget.c @@ -5794,6 +5794,11 @@ _efl_ui_widget_efl_object_destructor(Eo *obj, Elm_Widget_Smart_Data *sd) efl_weak_unref(&sd->logical.parent); sd->logical.parent = NULL; } + if (sd->children) + { + eina_array_free(sd->children); + sd->children = NULL; + } // TIZEN_ONLY(20150709) : atspi relations api if (sd->atspi_custom_relations) diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index 94d61d6fa2..c383721047 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -3733,6 +3733,9 @@ _efl_ui_win_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Win_Data *sd) eina_array_free(sd->profile.available); sd->profile.available = NULL; + eina_array_free(sd->planned_changes); + sd->planned_changes = NULL; + free(sd->wm_rot.rots); sd->wm_rot.rots = NULL; -- 2.34.1