neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/32524 )
Change subject: fix asn1 leak in error path of hnbgw_tx_ue_register_acc() ......................................................................
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(-)
Approvals: pespin: Looks good to me, approved msuraev: Looks good to me, but someone else must approve Jenkins Builder: Verified
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);