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 <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder

Reply via email to