From 7a2db8db2ccc44e6bfb930621fbd70206b484489 Mon Sep 17 00:00:00 2001 From: Junseok Kim Date: Tue, 25 Jul 2023 11:08:43 +0900 Subject: [PATCH] ecore_wl2_dnd: fix memory leak of wl_data_source destroy wl_data_source before create new one @tizen_only Change-Id: I84cc4ce58e2208025355df93b6491c8c003808dd --- src/lib/ecore_wl2/ecore_wl2_dnd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c b/src/lib/ecore_wl2/ecore_wl2_dnd.c index f0e41e1..4292798 100644 --- a/src/lib/ecore_wl2/ecore_wl2_dnd.c +++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c @@ -630,6 +630,10 @@ ecore_wl2_dnd_selection_set(Ecore_Wl2_Input *input, const char **types) wl_array_init(&input->data.selection.types); } + //TIZEN_ONLY(20230725): fix memory leak + if (input->data.selection.source) + wl_data_source_destroy(input->data.selection.source); + // input->data.selection.source = NULL; if (!types[0]) return 0; -- 2.7.4