aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bsc/bsc_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bsc/bsc_test.c')
-rw-r--r--tests/bsc/bsc_test.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/bsc/bsc_test.c b/tests/bsc/bsc_test.c
index 541a44caf..298dc6069 100644
--- a/tests/bsc/bsc_test.c
+++ b/tests/bsc/bsc_test.c
@@ -39,6 +39,8 @@
#include <stdio.h>
#include <search.h>
+void *ctx = NULL;
+
enum test {
TEST_SCAN_TO_BTS,
TEST_SCAN_TO_MSC,
@@ -122,7 +124,7 @@ static void test_scan(void)
{
int i;
- struct gsm_network *net = bsc_network_init(NULL);
+ struct gsm_network *net = bsc_network_init(ctx);
struct gsm_bts *bts = gsm_bts_alloc(net, 0);
struct bsc_msc_data *msc;
struct gsm_subscriber_connection *conn;
@@ -227,11 +229,13 @@ static const struct log_info log_info = {
int main(int argc, char **argv)
{
- msgb_talloc_ctx_init(NULL, 0);
+ ctx = talloc_named_const(NULL, 0, "bsc-test");
+ msgb_talloc_ctx_init(ctx, 0);
osmo_init_logging(&log_info);
test_scan();
printf("Testing execution completed.\n");
+ talloc_free(ctx);
return 0;
}