commit | 7c45dc5bf348fa7220727420a10970b7be7ca0e2 | [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 | b0be39b998f19801f68ce237ef5c03c4ba573489 [diff] |
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; }