From 1fb60ca4362b76f56c99d08e6fe2dcab299cdb5c Mon Sep 17 00:00:00 2001 From: Jiwon Kim Date: Mon, 13 Feb 2017 19:28:08 +0900 Subject: [PATCH] eet: fix memory leak Fix memory leak about eet_mesh, eet_header @tizen_fix @27269, 168392, 168579 Change-Id: I9229482bcbb8a80fb9dd5720349ad70dd01e47ea Signed-off-by: Jiwon Kim --- src/modules/evas/model_savers/eet/evas_model_save_eet.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modules/evas/model_savers/eet/evas_model_save_eet.c b/src/modules/evas/model_savers/eet/evas_model_save_eet.c index 3f27721..6c9c5d8 100644 --- a/src/modules/evas/model_savers/eet/evas_model_save_eet.c +++ b/src/modules/evas/model_savers/eet/evas_model_save_eet.c @@ -171,6 +171,11 @@ evas_model_save_file_eet(const Evas_Canvas3D_Mesh *mesh, _set_material_to_eet_file_from_mesh(eet_mesh, eet_header, f); _set_frame_to_eet_file_from_mesh(eet_mesh); + // TIZEN_ONLY(20170213): Fix memory leak + eet_file->mesh = eet_mesh; + eet_file->header = eet_header; + // + if (ef == NULL) /*TIZEN_ONLY(20160920): Fix memory leak */ { ERR("Opening of file is failed."); @@ -178,9 +183,6 @@ evas_model_save_file_eet(const Evas_Canvas3D_Mesh *mesh, return; } - eet_file->mesh = eet_mesh; - eet_file->header = eet_header; - eet_data_write(ef, _file_descriptor, EVAS_CANVAS3D_FILE_CACHE_FILE_ENTRY, -- 2.7.4