diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2013-06-25 12:03:36 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-07-31 16:36:40 +0200 |
commit | 3615a30d3d201e656ef24eda28f83bfff3468e39 (patch) | |
tree | 02e815bbe914ad5dfcaee978d67f421169569970 /openbsc/tests | |
parent | ddf191eafc079cb26e2956a611d59e5235de1798 (diff) |
nat: Fix some memory leaks in the testcases.
The test cases did not free some of the resources it allocated.
Improve the situation a bit. There is still data allocated that
is not freed at exit.
Diffstat (limited to 'openbsc/tests')
-rw-r--r-- | openbsc/tests/bsc-nat/bsc_nat_test.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/openbsc/tests/bsc-nat/bsc_nat_test.c b/openbsc/tests/bsc-nat/bsc_nat_test.c index b0350044e..2b3041398 100644 --- a/openbsc/tests/bsc-nat/bsc_nat_test.c +++ b/openbsc/tests/bsc-nat/bsc_nat_test.c @@ -452,6 +452,8 @@ static void test_paging(void) printf("Should have found it.\n"); abort(); } + + talloc_free(nat); } static void test_mgcp_allocations(void) @@ -820,6 +822,7 @@ static void test_cr_filter() } msgb_free(msg); + talloc_free(nat); } static void test_dt_filter() @@ -1040,6 +1043,8 @@ static void test_setup_rewrite() verify_msg(out, cc_setup_national_again, ARRAY_SIZE(cc_setup_national_again)); msgb_free(out); + bsc_nat_num_rewr_entry_adapt(nat, &nat->num_rewr, NULL); + talloc_free(nat); } static void test_setup_rewrite_prefix(void) |