aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-05-02 14:44:51 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-05-02 14:44:56 +0200
commit95d0ba5f401db53d5ce3f296ec02bd33865a387b (patch)
tree0fd6874c19e2fc835fa8a021270572e33a7114ce /src/tests
parentbb289e3b810683dadc5e2dd0b345b97cd3e8bddb (diff)
test-ranap: fix missing free in test_aper_causemisc, fixes expout
After aper_decode(), we still need to free the decoded struct. This was introduced in 14da5411a4fbe05eccff5b4f0934d52773a3f97a ("test-ranap: Add test case about constrained integer range decode") Note, in that commit there is another test failure in expout (a reversed byte order) which is "secretly" fixed in bb289e3b810683dadc5e2dd0b345b97cd3e8bddb ("RAB parameters: add Extended Max Bitrate"). This commit fixes: @@ -213,6 +212,7 @@ </RANAP_IE> 00 0a 00 11 00 00 01 00 29 40 0a 00 00 01 00 28 40 03 05 c2 d0 report -talloc report on 'asn1_context' (total 0 bytes in 1 blocks) +talloc report on 'asn1_context' (total 40 bytes in 2 blocks) + constr_CHOICE.c:927 contains 40 bytes in 1 blocks (ref 0) 0x187e690 talloc report on 'msgb' (total 1 bytes in 1 blocks) exit
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/test-ranap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tests/test-ranap.c b/src/tests/test-ranap.c
index addc14f..d00f583 100644
--- a/src/tests/test-ranap.c
+++ b/src/tests/test-ranap.c
@@ -78,6 +78,7 @@ static void test_aper_causemisc(uint32_t inp, uint8_t exp_enc)
printf("Decoded Cause Misc=%u\n", c_dec->choice.misc);
OSMO_ASSERT(c_dec->present == RANAP_Cause_PR_misc);
OSMO_ASSERT(c_dec->choice.misc == inp);
+ ASN_STRUCT_FREE(asn_DEF_RANAP_Cause, c_dec);
}
int main(int argc, char **argv)