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
This commit is contained in:
Vadim Yanitskiy
2018-07-30 03:04:34 +07:00
parent 527d934807
commit 4793a7efc3

View File

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