forked from enlightenment/efl
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
This commit is contained in:
parent
cfbdcdc9c8
commit
b209bb051b
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue