ipaccess: Fix a resource leak in case the stat is failing

Close the file when the stat is failing.

Fixes: Coverity CID 1040711
This commit is contained in:
Holger Hans Peter Freyther
2013-07-14 08:37:06 +02:00
parent 5ccd015371
commit 3aedba66bd

View File

@@ -743,6 +743,7 @@ static void analyze_firmware(const char *filename)
/* verify the file */
if (fstat(fd, &stat) == -1) {
perror("Can not stat the file");
close(fd);
return;
}