aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Michael <cp.michael@samsung.com>2019-05-02 13:47:22 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2019-05-02 13:47:22 +0200
commitb563fed2e48fe44786f02b39939a39501b7c2e6e (patch)
tree38a817ef04761357310bed07dd7c0e003c327218
parenteina_bench_stringshare: Fix resourcce leak (diff)
downloadefl-b563fed2e48fe44786f02b39939a39501b7c2e6e.tar.gz
evas_test_image: Fix resource leak
Summary: Coverity reports that we leak variable 'f' going out of scope here, so if we are going to exit the test, lets close the file before we do Fixes CID1400945 @fix Depends on https://phab.enlightenment.org/D8770 Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi Reviewed By: segfaultxavi Subscribers: segfaultxavi, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8771
-rw-r--r--src/tests/evas/evas_test_image.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tests/evas/evas_test_image.c b/src/tests/evas/evas_test_image.c
index 259cff77d3..19ae8ffb6a 100644
--- a/src/tests/evas/evas_test_image.c
+++ b/src/tests/evas/evas_test_image.c
@@ -647,6 +647,7 @@ _file_to_memory(const char *filename, char **result)
if ((size_t)size != fread(*result, sizeof(char), size, f))
{
free(*result);
+ fclose(f);
return -1;
}
fclose(f);