From b35f90e898870a6c10b4fbb32bb0626fa949df96 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Fri, 20 Sep 2019 10:46:02 +0200 Subject: [PATCH] efl_ui_selection_manager: free allocated memory after local use This temporary allocation is only used in this block and goes out of scope when leaving. Make sure we free the resource before this happens. Coverity ID: 1402653 Reviewed-by: Mike Blumenkrantz Differential Revision: https://phab.enlightenment.org/D10045 --- src/lib/elementary/efl_ui_selection_manager.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/elementary/efl_ui_selection_manager.c b/src/lib/elementary/efl_ui_selection_manager.c index 2e7be5c..c42394c 100644 --- a/src/lib/elementary/efl_ui_selection_manager.c +++ b/src/lib/elementary/efl_ui_selection_manager.c @@ -2454,6 +2454,7 @@ _wl_general_converter(char *target, Sel_Manager_Selection *sel, void *data, int memcpy(tmp, data, size); if (data_ret) *data_ret = tmp; if (size_ret) *size_ret = size; + if (!data_ret) free(tmp); } } else -- 2.7.4