summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas
diff options
context:
space:
mode:
authorBogdan Devichev <b.devichev@samsung.com>2014-10-27 14:57:22 +0100
committerStefan Schmidt <s.schmidt@samsung.com>2014-10-27 14:58:36 +0100
commit0e736ee62454a2209aae3b881d24526a94767259 (patch)
treed1ffad399acc72fc62e596fc21786b6645cbeae9 /src/lib/evas/canvas
parentf8ea40f08239003a7365645972462e1dcb790f0d (diff)
evas/3d: Fix resource leaks found by coverity
CID: 1244183 - 1244187 Reviewers: cedric, artem.popov, Oleksander Subscribers: stefan_schmidt, cedric Differential Revision: https://phab.enlightenment.org/D1585
Diffstat (limited to 'src/lib/evas/canvas')
-rw-r--r--src/lib/evas/canvas/evas_3d_mesh_loader_eet.c2
-rw-r--r--src/lib/evas/canvas/evas_3d_mesh_saver_eet.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/evas/canvas/evas_3d_mesh_loader_eet.c b/src/lib/evas/canvas/evas_3d_mesh_loader_eet.c
index edc1f3a58a..26c3569e04 100644
--- a/src/lib/evas/canvas/evas_3d_mesh_loader_eet.c
+++ b/src/lib/evas/canvas/evas_3d_mesh_loader_eet.c
@@ -109,8 +109,6 @@ evas_3d_mesh_file_eet_set(Evas_3D_Mesh *mesh, const char *file)
109 Eet_File *ef; 109 Eet_File *ef;
110 110
111 _evas_3d_eet_file_init(); 111 _evas_3d_eet_file_init();
112
113 eet_file = _evas_3d_eet_file_new();
114 ef = eet_open(file, EET_FILE_MODE_READ); 112 ef = eet_open(file, EET_FILE_MODE_READ);
115 eet_file = eet_data_read(ef, 113 eet_file = eet_data_read(ef,
116 _file_descriptor, 114 _file_descriptor,
diff --git a/src/lib/evas/canvas/evas_3d_mesh_saver_eet.c b/src/lib/evas/canvas/evas_3d_mesh_saver_eet.c
index 925fb5364b..c801ac1025 100644
--- a/src/lib/evas/canvas/evas_3d_mesh_saver_eet.c
+++ b/src/lib/evas/canvas/evas_3d_mesh_saver_eet.c
@@ -33,6 +33,7 @@ _set_geometry_to_eet_file_from_mesh(Evas_3D_Mesh_Data *mesh,
33 ERR("Allocating of memory is failed."); 33 ERR("Allocating of memory is failed.");
34 free(vertices); 34 free(vertices);
35 free(geometry); 35 free(geometry);
36 free(geometries);
36 return; 37 return;
37 } 38 }
38 39
@@ -46,6 +47,7 @@ _set_geometry_to_eet_file_from_mesh(Evas_3D_Mesh_Data *mesh,
46 ERR("Reading of geometrics is failed.");\ 47 ERR("Reading of geometrics is failed.");\
47 free(vertices);\ 48 free(vertices);\
48 free(geometry);\ 49 free(geometry);\
50 free(geometries);\
49 return;\ 51 return;\
50 }\ 52 }\
51 src = (float *)vb->data;\ 53 src = (float *)vb->data;\
@@ -88,6 +90,7 @@ _set_material_to_eet_file_from_mesh(Evas_3D_Mesh_Eet *eet_mesh,
88 free(material); 90 free(material);
89 free(saved_materials); 91 free(saved_materials);
90 free(saved_colors); 92 free(saved_colors);
93 free(materials);
91 return; 94 return;
92 } 95 }
93 96
@@ -173,6 +176,8 @@ evas_3d_mesh_save_eet(Evas_3D_Mesh *mesh,
173 if (ef == NULL) 176 if (ef == NULL)
174 { 177 {
175 ERR("Opening of file is failed."); 178 ERR("Opening of file is failed.");
179 free(eet_mesh);
180 free(eet_header);
176 _evas_3d_eet_file_free(); 181 _evas_3d_eet_file_free();
177 return; 182 return;
178 } 183 }