summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-04-08 17:34:43 +0700
committerHarald Welte <laforge@gnumonks.org>2018-04-09 08:26:22 +0000
commit60bf444718260660ec9cb1a4015c08b5cb8cf7f4 (patch)
tree6cd503a92d94f9d12935148fe40df296aa03e898
parentfa0d7c0c4f1c35fa2b605283ac8a5117fa843501 (diff)
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
-rw-r--r--src/host/trxcon/trxcon.c9
1 files 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;
}