summaryrefslogtreecommitdiff
path: root/src/tests/evas/evas_test_image.c
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 /src/tests/evas/evas_test_image.c
parentdb195e76cdca0f7602b675eeb814facad1afd800 (diff)
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 D8770 Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi Reviewed By: segfaultxavi Subscribers: segfaultxavi, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8771
Diffstat (limited to 'src/tests/evas/evas_test_image.c')
-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)
647 if ((size_t)size != fread(*result, sizeof(char), size, f)) 647 if ((size_t)size != fread(*result, sizeof(char), size, f))
648 { 648 {
649 free(*result); 649 free(*result);
650 fclose(f);
650 return -1; 651 return -1;
651 } 652 }
652 fclose(f); 653 fclose(f);