From 64a7b3d44f3f5d917943ac22c3af1221f1df7fdf Mon Sep 17 00:00:00 2001 From: "perepelits.m" Date: Mon, 21 Sep 2015 23:19:57 +0200 Subject: [PATCH] evas: remove unused variable in evas_tangent_space_get. Summary: Firstly it was the main point of in CID1323089 from Coverity, but this variable is unused. So I've deleted it. CID1323089 Reviewers: raster, Hermet, cedric Reviewed By: cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D3067 Signed-off-by: Cedric BAIL --- src/lib/evas/include/evas_3d_utils.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/lib/evas/include/evas_3d_utils.h b/src/lib/evas/include/evas_3d_utils.h index 8591d97..ed1e91f 100644 --- a/src/lib/evas/include/evas_3d_utils.h +++ b/src/lib/evas/include/evas_3d_utils.h @@ -2829,14 +2829,6 @@ evas_tangent_space_get(float *data, float *tex_data, float *normal_data, unsigne return; } - unsigned short int *tmp_index = (unsigned short int*) malloc((vertex_count) * sizeof(unsigned short int)); - - if (tmp_index == NULL) - { - ERR("Failed to allocate memory %d %s", __LINE__, __FILE__); - return; - } - float *tmp_tangent = (float*) malloc((3 * vertex_count) * sizeof(float)); if (tmp_tangent == NULL) { @@ -2934,7 +2926,6 @@ evas_tangent_space_get(float *data, float *tex_data, float *normal_data, unsigne memcpy(*tangent, tmp_tangent, (3 * vertex_count) * sizeof(float)); - free(tmp_index); free(tmp_tangent); return; -- 2.7.4