From 9d51855f66e1a2fe227c76c200ce8d0c9b55361c Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 5 Apr 2010 21:44:51 +0200 Subject: nat: remove is called on already patched connections.. Fix the test to search for the original message instead of the already patched one that should not find any items anyway. The remove is called on already patched connections so we need to match it with the patch reference count. --- openbsc/tests/bsc-nat/bsc_nat_test.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'openbsc/tests/bsc-nat/bsc_nat_test.c') diff --git a/openbsc/tests/bsc-nat/bsc_nat_test.c b/openbsc/tests/bsc-nat/bsc_nat_test.c index 705372c8d..8ec5914ec 100644 --- a/openbsc/tests/bsc-nat/bsc_nat_test.c +++ b/openbsc/tests/bsc-nat/bsc_nat_test.c @@ -290,6 +290,10 @@ static void test_contrack() abort(); } remove_sccp_src_ref(con, msg, parsed); + talloc_free(parsed); + + copy_to_msg(msg, bsc_rlc, sizeof(bsc_rlc)); + parsed = bsc_nat_parse(msg); con_found = patch_sccp_src_ref_to_msc(msg, parsed, nat); /* verify that it is gone */ -- cgit v1.2.3