From cc6240aeb2e895a8df8c4bdca7fcae082b4f00bb Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Tue, 13 Feb 2018 21:21:42 +0100 Subject: libcommon: eliminate talloc_ctx.c Interestingly enough, talloc_ctx_init() actually had not a single caller. While dropping it, see to it that the few contexts that are actually used in osmo-bsc.git are indeed initialized in all the main scopes. Also initialize two void* ctxts as NULL explicitly, to allocate under the NULL context in case some main scope forgets to branch it off another root context. (That's bsc, fle and paging, all others actually come in from other libraries.) Change-Id: I344a3d07e146999e154824837ed95db2b9879356 --- src/utils/bs11_config.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/utils') diff --git a/src/utils/bs11_config.c b/src/utils/bs11_config.c index 2122abe6a..8e947eb3e 100644 --- a/src/utils/bs11_config.c +++ b/src/utils/bs11_config.c @@ -899,12 +899,16 @@ const struct log_info log_info = { }; extern int bts_model_bs11_init(void); + +extern void *tall_fle_ctx; + int main(int argc, char **argv) { struct gsm_network *gsmnet; struct e1inp_line *line; tall_bs11cfg_ctx = talloc_named_const(NULL, 0, "bs11-config"); + tall_fle_ctx = talloc_named_const(tall_bs11cfg_ctx, 0, "bs11_file_list_entry"); msgb_talloc_ctx_init(tall_bs11cfg_ctx, 0); osmo_init_logging(&log_info); -- cgit v1.2.3