aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-07-30 03:04:34 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2018-07-30 03:57:03 +0700
commit4793a7efc34e1e5945b8adc7ee344406db61fd53 (patch)
tree91c31aa82b0c5f55efb94bcd92634859791c81af
parent527d934807457f1d5a944fd12658e3403b4de772 (diff)
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
-rw-r--r--src/hlr.c5
1 files changed, 5 insertions, 0 deletions
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 @@ int main(int argc, char **argv)
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;
}