diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-07-14 08:37:06 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-07-14 09:04:50 +0200 |
commit | 3aedba66bd06de7e5db0fc38775fa20c29e40033 (patch) | |
tree | 47d7c93d6a2c8a57feaa193a83feebe64f952ae4 /openbsc/src/ipaccess | |
parent | 5ccd015371ba013f37e474b9e9f23b845fd17f43 (diff) |
ipaccess: Fix a resource leak in case the stat is failing
Close the file when the stat is failing.
Fixes: Coverity CID 1040711
Diffstat (limited to 'openbsc/src/ipaccess')
-rw-r--r-- | openbsc/src/ipaccess/ipaccess-config.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/openbsc/src/ipaccess/ipaccess-config.c b/openbsc/src/ipaccess/ipaccess-config.c index 75c37f0ea..e66771a1a 100644 --- a/openbsc/src/ipaccess/ipaccess-config.c +++ b/openbsc/src/ipaccess/ipaccess-config.c @@ -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; } |