Change in libosmocore[master]: osmo-config-merge: fclose() what we fopen()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun Oct 21 09:42:06 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/11396 )

Change subject: osmo-config-merge: fclose() what we fopen()
......................................................................

osmo-config-merge: fclose() what we fopen()

Change-Id: Ib44f902e5bca2277f1b340d34fabbd2a298d683e
Fixes: Coverity CID#188851
---
M utils/osmo-config-merge.c
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



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;
 }
 

-- 
To view, visit https://gerrit.osmocom.org/11396
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib44f902e5bca2277f1b340d34fabbd2a298d683e
Gerrit-Change-Number: 11396
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181021/4f9b91d0/attachment.htm>


More information about the gerrit-log mailing list