forked from enlightenment/efl
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:
parent
f8ea40f082
commit
0e736ee624
|
@ -109,8 +109,6 @@ evas_3d_mesh_file_eet_set(Evas_3D_Mesh *mesh, const char *file)
|
||||||
Eet_File *ef;
|
Eet_File *ef;
|
||||||
|
|
||||||
_evas_3d_eet_file_init();
|
_evas_3d_eet_file_init();
|
||||||
|
|
||||||
eet_file = _evas_3d_eet_file_new();
|
|
||||||
ef = eet_open(file, EET_FILE_MODE_READ);
|
ef = eet_open(file, EET_FILE_MODE_READ);
|
||||||
eet_file = eet_data_read(ef,
|
eet_file = eet_data_read(ef,
|
||||||
_file_descriptor,
|
_file_descriptor,
|
||||||
|
|
|
@ -33,6 +33,7 @@ _set_geometry_to_eet_file_from_mesh(Evas_3D_Mesh_Data *mesh,
|
||||||
ERR("Allocating of memory is failed.");
|
ERR("Allocating of memory is failed.");
|
||||||
free(vertices);
|
free(vertices);
|
||||||
free(geometry);
|
free(geometry);
|
||||||
|
free(geometries);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,6 +47,7 @@ _set_geometry_to_eet_file_from_mesh(Evas_3D_Mesh_Data *mesh,
|
||||||
ERR("Reading of geometrics is failed.");\
|
ERR("Reading of geometrics is failed.");\
|
||||||
free(vertices);\
|
free(vertices);\
|
||||||
free(geometry);\
|
free(geometry);\
|
||||||
|
free(geometries);\
|
||||||
return;\
|
return;\
|
||||||
}\
|
}\
|
||||||
src = (float *)vb->data;\
|
src = (float *)vb->data;\
|
||||||
|
@ -88,6 +90,7 @@ _set_material_to_eet_file_from_mesh(Evas_3D_Mesh_Eet *eet_mesh,
|
||||||
free(material);
|
free(material);
|
||||||
free(saved_materials);
|
free(saved_materials);
|
||||||
free(saved_colors);
|
free(saved_colors);
|
||||||
|
free(materials);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,6 +176,8 @@ evas_3d_mesh_save_eet(Evas_3D_Mesh *mesh,
|
||||||
if (ef == NULL)
|
if (ef == NULL)
|
||||||
{
|
{
|
||||||
ERR("Opening of file is failed.");
|
ERR("Opening of file is failed.");
|
||||||
|
free(eet_mesh);
|
||||||
|
free(eet_header);
|
||||||
_evas_3d_eet_file_free();
|
_evas_3d_eet_file_free();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue