diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2018-03-05 05:31:14 +0100 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2018-03-28 19:24:34 +0200 |
commit | e34161832d936959640d5e5735dfa1ca7bccae13 (patch) | |
tree | ec2853807f0e1ae88607eea6e68e3edd0e51ad70 /tests/subscr | |
parent | 68c76e9036538d51232c61ce8c5c28e4035456ac (diff) |
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
Diffstat (limited to 'tests/subscr')
-rw-r--r-- | tests/subscr/bsc_subscr_test.c | 5 |
1 files changed, 3 insertions, 2 deletions
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(); |