summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-07-04 18:47:44 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-07-04 18:49:04 +0200
commit7d8139a42e03f77669d23a5cead48530db0b1da0 (patch)
treec82d533b117f328a69360b7783dae72c98d73fb8
parentaa63d70f39c6c205e47eff1af077865405cdf61b (diff)
ipaccess-config: Fix a resource leak in an error path
Fixes: Coverity CID 1040710, CID 1040711
-rw-r--r--openbsc/src/ipaccess/ipaccess-config.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/openbsc/src/ipaccess/ipaccess-config.c b/openbsc/src/ipaccess/ipaccess-config.c
index 14749d8..e957817 100644
--- a/openbsc/src/ipaccess/ipaccess-config.c
+++ b/openbsc/src/ipaccess/ipaccess-config.c
@@ -648,6 +648,7 @@ static int find_sw_load_params(const char *filename)
/* verify the file */
if (fstat(fd, &stat) == -1) {
perror("Can not stat the file");
+ close(fd);
return -1;
}