aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-07-07 19:22:02 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-07-07 19:22:02 +0200
commit84db98fdbe93c6431469787f7ccf4e17458214be (patch)
tree9407f70166588e42815b6d01a661a43c1623f537
parent46d13268b89c4b5873bbdd5c1a8d81faa364fee5 (diff)
gbproxy_test: Reset the gbproxy before we reset GPRS NS
The peers are (talloc) children of the GPRS NS. This means the peers (and the rate counters) are currently being deleted twice. ==23446== Invalid write of size 4 ==23446== at 0x403C243: rate_ctr_group_alloc (linuxlist.h:66) ==23446== by 0x4050974: gprs_nsvc_create (gprs_ns.c:209) ==23446== by 0x405320D: gprs_ns_instantiate (gprs_ns.c:1330) ==23446== by 0x804ABEB: main (gbproxy_test.c:666) ==23446== Address 0x4300694 is 52 bytes inside a block of size 784 free'd ==23446== at 0x4029DA8: free (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==23446== by 0x4041B9D: _talloc_free (talloc.c:609) ==23446== by 0x4043292: talloc_free (talloc.c:578) ==23446== by 0x40532D3: gprs_ns_destroy (gprs_ns.c:1363) ==23446== by 0x804ABD7: main (gbproxy_test.c:660)
-rw-r--r--openbsc/tests/gbproxy/gbproxy_test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/openbsc/tests/gbproxy/gbproxy_test.c b/openbsc/tests/gbproxy/gbproxy_test.c
index 83832b58f..74a220ab0 100644
--- a/openbsc/tests/gbproxy/gbproxy_test.c
+++ b/openbsc/tests/gbproxy/gbproxy_test.c
@@ -656,9 +656,9 @@ static void test_gbproxy()
gbprox_dump_global(stdout, 0);
+ gbprox_reset();
gprs_ns_destroy(nsi);
nsi = NULL;
- gbprox_reset();
}
static void test_gbproxy_ident_changes()
@@ -787,9 +787,9 @@ static void test_gbproxy_ident_changes()
gbprox_dump_global(stdout, 0);
gbprox_dump_peers(stdout, 0);
+ gbprox_reset();
gprs_ns_destroy(nsi);
nsi = NULL;
- gbprox_reset();
}
static void test_gbproxy_ra_patching()
@@ -866,9 +866,9 @@ static void test_gbproxy_ra_patching()
gbprox_dump_global(stdout, 0);
gbprox_dump_peers(stdout, 0);
+ gbprox_reset();
gprs_ns_destroy(nsi);
nsi = NULL;
- gbprox_reset();
}