eet: fix memory leak 72/114472/3
authorJiwon Kim <jiwon177.kim@samsung.com>
Mon, 13 Feb 2017 10:28:08 +0000 (19:28 +0900)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Wed, 5 Apr 2017 10:17:21 +0000 (03:17 -0700)
Fix memory leak about eet_mesh, eet_header

@tizen_fix
@27269, 168392, 168579

Change-Id: I9229482bcbb8a80fb9dd5720349ad70dd01e47ea
Signed-off-by: Jiwon Kim <jiwon177.kim@samsung.com>
src/modules/evas/model_savers/eet/evas_model_save_eet.c

index 3f27721..6c9c5d8 100644 (file)
@@ -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,