From e34161832d936959640d5e5735dfa1ca7bccae13 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Mon, 5 Mar 2018 05:31:14 +0100 Subject: ctx cleanup: use non-NULL talloc ctx for osmo_init_logging2() Fix various sanitizer complaints about memory leaks using a sanitizer build with gcc (Debian 7.3.0-12) 7.3.0. Also fix deprecation warnings on osmo_init_logging(). Depends: I216837780e9405fdaec8059c63d10699c695b360 (libosmocore) Change-Id: I970c6f8a0e36a8b63e42349dbc92baff649e5cef --- tests/subscr/bsc_subscr_test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/subscr') diff --git a/tests/subscr/bsc_subscr_test.c b/tests/subscr/bsc_subscr_test.c index d15c1141d..3c94b8662 100644 --- a/tests/subscr/bsc_subscr_test.c +++ b/tests/subscr/bsc_subscr_test.c @@ -125,14 +125,15 @@ static const struct log_info log_info = { int main() { + void *ctx = talloc_named_const(NULL, 0, "bsc_subscr_test"); printf("Testing BSC subscriber core code.\n"); - osmo_init_logging(&log_info); + osmo_init_logging2(ctx, &log_info); log_set_print_filename(osmo_stderr_target, 0); log_set_print_timestamp(osmo_stderr_target, 0); log_set_use_color(osmo_stderr_target, 0); log_set_print_category(osmo_stderr_target, 1); - bsc_subscribers = talloc_zero(NULL, struct llist_head); + bsc_subscribers = talloc_zero(ctx, struct llist_head); INIT_LLIST_HEAD(bsc_subscribers); test_bsc_subscr(); -- cgit v1.2.3