epp - fix unchecked return

fix CID 1039717
This commit is contained in:
Carsten Haitzler 2014-08-14 19:04:38 +09:00
parent 00d3bd1747
commit f9cef6f079
1 changed files with 5 additions and 1 deletions

View File

@ -5257,7 +5257,11 @@ lookup_import(cpp_reader * pfile, char *filename, file_name_list * searchptr)
fd = open_include_file(pfile, filename, searchptr);
if (fd < 0)
return fd;
fstat(fd, &sb);
if (fstat(fd, &sb) < 0)
{
close(fd);
return -2;
}
for (h = 0; h < IMPORT_HASH_SIZE; h++)
{
i = pfile->import_hash_table[h];