summaryrefslogtreecommitdiff
path: root/src/tests/evas
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2020-06-09 14:29:35 +0200
committerStefan Schmidt <s.schmidt@samsung.com>2020-06-10 10:07:59 +0200
commitb209bb051b16cfb5b20ac6070cd3400c46996388 (patch)
tree0fd213720b5f7f32a45edbe648b65cd06ef8ce23 /src/tests/evas
parentcfbdcdc9c81c5cd14d8dc9f1db4d102d8052b473 (diff)
tests: evas: check fd being non -1 before using close()
eina_file_mkstemp would return -1 in an error case. Make sure we check the return when clsoing here. CID: 1400790 Reviewed-by: Christopher Michael <devilhorns@comcast.net> Differential Revision: https://phab.enlightenment.org/D11957
Diffstat (limited to 'src/tests/evas')
-rw-r--r--src/tests/evas/evas_test_image.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tests/evas/evas_test_image.c b/src/tests/evas/evas_test_image.c
index 7ee16048c8..8106a0869e 100644
--- a/src/tests/evas/evas_test_image.c
+++ b/src/tests/evas/evas_test_image.c
@@ -904,7 +904,8 @@ EFL_START_TEST(evas_object_image_map_unmap)
904 904
905 // save file, verify its pixels 905 // save file, verify its pixels
906 fd = eina_file_mkstemp("/tmp/evas-test.XXXXXX.png", &tmp); 906 fd = eina_file_mkstemp("/tmp/evas-test.XXXXXX.png", &tmp);
907 close(fd); 907 fail_if(fd <= 0);
908 fail_if(close(fd));
908 if (efl_file_save(o, tmp, NULL, NULL)) 909 if (efl_file_save(o, tmp, NULL, NULL))
909 { 910 {
910 Eina_Rw_Slice sorig, sdest; 911 Eina_Rw_Slice sorig, sdest;