Change in osmo-hlr[master]: hlr.c: free root talloc context on exit

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
Mon Jul 30 07:08:21 UTC 2018


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

Change subject: hlr.c: free root talloc context on exit
......................................................................

hlr.c: free root talloc context on exit

This makes both ASAN and Valgrind happy, because they do expect
all allocated heap chunks to be released on exit.

Change-Id: I7345dec8d06b0b71a859c16132dc0008cfe17cba
---
M src/hlr.c
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/src/hlr.c b/src/hlr.c
index 7fdb27e..6c0cb0a 100644
--- a/src/hlr.c
+++ b/src/hlr.c
@@ -625,7 +625,12 @@
 	db_close(g_hlr->dbc);
 	log_fini();
 
+	/**
+	 * Report the heap state of root context, then free,
+	 * so both ASAN and Valgrind are happy...
+	 */
 	talloc_report_full(hlr_ctx, stderr);
+	talloc_free(hlr_ctx);
 
 	return 0;
 }

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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I7345dec8d06b0b71a859c16132dc0008cfe17cba
Gerrit-Change-Number: 10223
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180730/cbd0c6ba/attachment.htm>


More information about the gerrit-log mailing list