From 60bf444718260660ec9cb1a4015c08b5cb8cf7f4 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Sun, 8 Apr 2018 17:34:43 +0700 Subject: host/trxcon: don't free root talloc context This is useless, and prevents us from finding potential memory leaks at exit. Let's print talloc report instead of that. Change-Id: Ibf04942070d654e97c3ed77d69ab19e44602758c --- src/host/trxcon/trxcon.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/host/trxcon/trxcon.c b/src/host/trxcon/trxcon.c index 43c98a5c..1d0ecc3a 100644 --- a/src/host/trxcon/trxcon.c +++ b/src/host/trxcon/trxcon.c @@ -309,9 +309,14 @@ exit: /* Shutdown main state machine */ osmo_fsm_inst_free(trxcon_fsm); - /* Make Valgrind happy */ + /* Deinitialize logging */ log_fini(); - talloc_free(tall_trx_ctx); + + /** + * Print report for the root talloc context in order + * to be able to find and fix potential memory leaks. + */ + talloc_report_full(tall_trx_ctx, stderr); return rc; } -- cgit v1.2.3