aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-04-16 00:57:10 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-04-16 01:03:48 +0200
commit5bd340eb5a176af428847949268869d71de8802c (patch)
tree7b65a93dc9a2e4309f04ca7921535b9b598c1930 /src
parent69e356be93c420b5e2f8b96fbc89ef889cbcfe53 (diff)
use osmo_init_logging2(), fix regression test memleaks
Particularly gbproxy_test.c had various mem leaks, which (will) show up with gcc (Debian 7.3.0-15) 7.3.0 address sanitizer. Fix those leaks to verify that we don't have memleaks in the production code. Change-Id: Ia4204c8b3d895b42c103edecb61b99d3d22bd36f
Diffstat (limited to 'src')
-rw-r--r--src/gprs/gb_proxy_main.c2
-rw-r--r--src/gprs/gtphub_main.c2
-rw-r--r--src/gprs/sgsn_main.c2
-rw-r--r--src/libcommon/gsup_test_client.c5
4 files changed, 6 insertions, 5 deletions
diff --git a/src/gprs/gb_proxy_main.c b/src/gprs/gb_proxy_main.c
index 1416ff589..04143bba1 100644
--- a/src/gprs/gb_proxy_main.c
+++ b/src/gprs/gb_proxy_main.c
@@ -275,7 +275,7 @@ int main(int argc, char **argv)
signal(SIGUSR2, &signal_handler);
osmo_init_ignore_signals();
- osmo_init_logging(&gprs_log_info);
+ osmo_init_logging2(tall_bsc_ctx, &gprs_log_info);
vty_info.copyright = openbsc_copyright;
vty_init(&vty_info);
diff --git a/src/gprs/gtphub_main.c b/src/gprs/gtphub_main.c
index 197c5e3ba..a1a2c1de7 100644
--- a/src/gprs/gtphub_main.c
+++ b/src/gprs/gtphub_main.c
@@ -346,7 +346,7 @@ int main(int argc, char **argv)
signal(SIGUSR2, &signal_handler);
osmo_init_ignore_signals();
- osmo_init_logging(&gtphub_log_info);
+ osmo_init_logging2(osmo_gtphub_ctx, &gtphub_log_info);
vty_info.copyright = gtphub_copyright;
vty_init(&vty_info);
diff --git a/src/gprs/sgsn_main.c b/src/gprs/sgsn_main.c
index 0276e34a8..feffefb5f 100644
--- a/src/gprs/sgsn_main.c
+++ b/src/gprs/sgsn_main.c
@@ -386,7 +386,7 @@ int main(int argc, char **argv)
signal(SIGUSR2, &signal_handler);
osmo_init_ignore_signals();
- osmo_init_logging(&gprs_log_info);
+ osmo_init_logging2(tall_bsc_ctx, &gprs_log_info);
osmo_stats_init(tall_bsc_ctx);
vty_info.copyright = openbsc_copyright;
diff --git a/src/libcommon/gsup_test_client.c b/src/libcommon/gsup_test_client.c
index cc0f58b00..2357ba52a 100644
--- a/src/libcommon/gsup_test_client.c
+++ b/src/libcommon/gsup_test_client.c
@@ -272,10 +272,11 @@ int main(int argc, char **argv)
unsigned long long i;
char *server_host = "127.0.0.1";
uint16_t server_port = OSMO_GSUP_PORT;
+ void *ctx = talloc_named_const(NULL, 0, "gsup_test_client");
- osmo_init_logging(&gsup_test_client_log_info);
+ osmo_init_logging2(ctx, &gsup_test_client_log_info);
- g_gc = gsup_client_create("GSUPTEST", server_host, server_port,
+ g_gc = gsup_client_create(ctx, "GSUPTEST", server_host, server_port,
gsupc_read_cb, NULL);