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
This commit is contained in:
Bogdan Devichev 2014-10-27 14:57:22 +01:00 committed by Stefan Schmidt
parent f8ea40f082
commit 0e736ee624
2 changed files with 5 additions and 2 deletions

View File

@ -109,8 +109,6 @@ evas_3d_mesh_file_eet_set(Evas_3D_Mesh *mesh, const char *file)
Eet_File *ef;
_evas_3d_eet_file_init();
eet_file = _evas_3d_eet_file_new();
ef = eet_open(file, EET_FILE_MODE_READ);
eet_file = eet_data_read(ef,
_file_descriptor,

View File

@ -33,6 +33,7 @@ _set_geometry_to_eet_file_from_mesh(Evas_3D_Mesh_Data *mesh,
ERR("Allocating of memory is failed.");
free(vertices);
free(geometry);
free(geometries);
return;
}
@ -46,6 +47,7 @@ _set_geometry_to_eet_file_from_mesh(Evas_3D_Mesh_Data *mesh,
ERR("Reading of geometrics is failed.");\
free(vertices);\
free(geometry);\
free(geometries);\
return;\
}\
src = (float *)vb->data;\
@ -88,6 +90,7 @@ _set_material_to_eet_file_from_mesh(Evas_3D_Mesh_Eet *eet_mesh,
free(material);
free(saved_materials);
free(saved_colors);
free(materials);
return;
}
@ -173,6 +176,8 @@ evas_3d_mesh_save_eet(Evas_3D_Mesh *mesh,
if (ef == NULL)
{
ERR("Opening of file is failed.");
free(eet_mesh);
free(eet_header);
_evas_3d_eet_file_free();
return;
}