projects
/
platform
/
upstream
/
efl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a173635
)
tests: evas: check fd being non -1 before using close()
author
Stefan Schmidt
<s.schmidt@samsung.com>
Tue, 9 Jun 2020 12:29:35 +0000
(14:29 +0200)
committer
Jongmin Lee
<jm105.lee@samsung.com>
Wed, 10 Jun 2020 21:27:10 +0000
(06:27 +0900)
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
src/tests/evas/evas_test_image.c
patch
|
blob
|
history
diff --git
a/src/tests/evas/evas_test_image.c
b/src/tests/evas/evas_test_image.c
index
7ee1604
..
8106a08
100644
(file)
--- 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)
// save file, verify its pixels
fd = eina_file_mkstemp("/tmp/evas-test.XXXXXX.png", &tmp);
- close(fd);
+ fail_if(fd <= 0);
+ fail_if(close(fd));
if (efl_file_save(o, tmp, NULL, NULL))
{
Eina_Rw_Slice sorig, sdest;