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:
parent
5ccd015371
commit
3aedba66bd
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue