summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-04-08 17:41:25 +0700
committerHarald Welte <laforge@gnumonks.org>2018-04-09 08:26:23 +0000
commit9803a35a8a3332f32f1dd2e9cd5c5e591a31b095 (patch)
tree318b5992f85d167832c350a211e0c4d824fa4dc0
parent60bf444718260660ec9cb1a4015c08b5cb8cf7f4 (diff)
host/trxcon: track talloc NULL contexts by default
In order to be able to introspect not only the root application context, but also all other contexts, e.g. allocated within libosmocore or other libraries, let's enable tracking the use of NULL contexts using the corresponding talloc API. Change-Id: Id21cd5ee340def443f7a5d0b2b8f37f41188dd87
-rw-r--r--src/host/trxcon/trxcon.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/host/trxcon/trxcon.c b/src/host/trxcon/trxcon.c
index 1d0ecc3a..c7468169 100644
--- a/src/host/trxcon/trxcon.c
+++ b/src/host/trxcon/trxcon.c
@@ -247,6 +247,9 @@ int main(int argc, char **argv)
init_defaults();
handle_options(argc, argv);
+ /* Track the use of talloc NULL memory contexts */
+ talloc_enable_null_tracking();
+
/* Init talloc memory management system */
tall_trx_ctx = talloc_init("trxcon context");
msgb_talloc_ctx_init(tall_trx_ctx, 0);