From e05798bfe08d4192b7e0ec5fd3af42422eb71937 Mon Sep 17 00:00:00 2001 From: SubhransuSekhar Mohanty Date: Thu, 25 Jul 2019 15:17:05 +0900 Subject: [PATCH] efl_canvas_vg svg: free the svg tree returned by eet_data_read() The eet_data_read() api creates the structure by referencing the wwt data structure and reading from eet file. So the structure should be deleted by the user of the function. As eet_data_read() api documentation dosen't specify about the ownership I guess we need to free this structure to avoid memory leak. Change-Id: I0a9341d046d2a2b46cb920cfbe3e6588259f5cea --- src/modules/evas/vg_loaders/eet/evas_vg_load_eet.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/evas/vg_loaders/eet/evas_vg_load_eet.c b/src/modules/evas/vg_loaders/eet/evas_vg_load_eet.c index f0bde2e..8d04aec 100644 --- a/src/modules/evas/vg_loaders/eet/evas_vg_load_eet.c +++ b/src/modules/evas/vg_loaders/eet/evas_vg_load_eet.c @@ -36,7 +36,9 @@ evas_vg_load_file_open_eet(Eina_File *file, const char *key, int *error EINA_UNU { *error = EVAS_LOAD_ERROR_NONE; } - return vg_common_svg_create_vg_node(node); + Vg_File_Data *vg_data = vg_common_svg_create_vg_node(node); + vg_common_svg_node_free(node); + return vg_data; } static Eina_Bool -- 2.7.4