commit | 3aedba66bd06de7e5db0fc38775fa20c29e40033 | [log] [tgz] |
---|---|---|
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | Sun Jul 14 08:37:06 2013 +0200 |
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | Sun Jul 14 09:04:50 2013 +0200 |
tree | 47d7c93d6a2c8a57feaa193a83feebe64f952ae4 | |
parent | 5ccd015371ba013f37e474b9e9f23b845fd17f43 [diff] [blame] |
ipaccess: Fix a resource leak in case the stat is failing Close the file when the stat is failing. Fixes: Coverity CID 1040711
diff --git a/openbsc/src/ipaccess/ipaccess-config.c b/openbsc/src/ipaccess/ipaccess-config.c index 75c37f0..e66771a 100644 --- a/openbsc/src/ipaccess/ipaccess-config.c +++ b/openbsc/src/ipaccess/ipaccess-config.c
@@ -743,6 +743,7 @@ /* verify the file */ if (fstat(fd, &stat) == -1) { perror("Can not stat the file"); + close(fd); return; }