Add checks for open_ih() return value

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@842 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Blue Swirl
2010-08-08 18:50:22 +00:00
parent 84518defd6
commit 7d13c41dad
5 changed files with 47 additions and 20 deletions

View File

@@ -219,10 +219,14 @@ iso9660_files_probe( iso9660_info_t *dummy )
int fd, ret = 0;
fd = open_ih(ih);
if (iso9660_probe(fd, offs))
ret = -1;
close_io(fd);
if (fd >= 0) {
if (iso9660_probe(fd, offs)) {
ret = -1;
}
close_io(fd);
} else {
ret = -1;
}
RET (ret);
}