aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-10-21 10:57:36 +0200
committerHarald Welte <laforge@gnumonks.org>2018-10-21 10:58:33 +0200
commit41b6b5e3fc0ff9928052ce7183aebe8fe4810553 (patch)
tree75ee2f086f07e07939649ea1f7a5368c418ba68a
parentf6c369fb8c1b2b6a567da277f35285284b43b089 (diff)
osmo-config-merge: fclose() what we fopen()
Change-Id: Ib44f902e5bca2277f1b340d34fabbd2a298d683e Fixes: Coverity CID#188851
-rw-r--r--utils/osmo-config-merge.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/osmo-config-merge.c b/utils/osmo-config-merge.c
index a872d646..afaf86b5 100644
--- a/utils/osmo-config-merge.c
+++ b/utils/osmo-config-merge.c
@@ -144,6 +144,7 @@ static struct node *file_read(void *ctx, const char *fname)
if (indent > cur_indent+1) {
fprintf(stderr, "File '%s' isn't well-formed in line %u, aborting!\n",
fname, line_num);
+ fclose(infile);
return NULL;
}
/* new child to last node */
@@ -166,6 +167,7 @@ static struct node *file_read(void *ctx, const char *fname)
cur_indent = indent;
}
+ fclose(infile);
return root;
}