osmo-config-merge: fclose() what we fopen()
Change-Id: Ib44f902e5bca2277f1b340d34fabbd2a298d683e
Fixes: Coverity CID#188851
diff --git a/utils/osmo-config-merge.c b/utils/osmo-config-merge.c
index a872d64..afaf86b 100644
--- a/utils/osmo-config-merge.c
+++ b/utils/osmo-config-merge.c
@@ -144,6 +144,7 @@
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 @@
cur_indent = indent;
}
+ fclose(infile);
return root;
}