neels has uploaded this change for review.
fix asn1 leak in error path of hnbgw_tx_ue_register_acc()
Related: SYS#6297
Change-Id: Iaaf7a393ef1fcad619687e2eb2dcc31f0aec0e96
---
M src/osmo-hnbgw/hnbgw_hnbap.c
1 file changed, 11 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/24/32524/1
diff --git a/src/osmo-hnbgw/hnbgw_hnbap.c b/src/osmo-hnbgw/hnbgw_hnbap.c
index a1cbec5..bc3dccd 100644
--- a/src/osmo-hnbgw/hnbgw_hnbap.c
+++ b/src/osmo-hnbgw/hnbgw_hnbap.c
@@ -146,6 +146,7 @@
memset(&accept_out, 0, sizeof(accept_out));
rc = hnbap_encode_ueregisteraccepties(&accept_out, &accept);
+ ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_OCTET_STRING, &accept.uE_Identity.choice.iMSI);
if (rc < 0) {
return rc;
}
@@ -155,7 +156,6 @@
&asn_DEF_HNBAP_UERegisterAccept,
&accept_out);
- ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_OCTET_STRING, &accept.uE_Identity.choice.iMSI);
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_HNBAP_UERegisterAccept, &accept_out);
return hnbgw_hnbap_tx(ue->hnb, msg);
To view, visit change 32524. To unsubscribe, or for help writing mail filters, visit settings.