mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user