fix asn1 leak in error path of hnbgw_tx_ue_register_acc()

Related: SYS#6297
Change-Id: Iaaf7a393ef1fcad619687e2eb2dcc31f0aec0e96
This commit is contained in:
Neels Hofmeyr 2023-04-27 03:52:45 +02:00 committed by neels
parent 7f219856c9
commit e33d7321df
1 changed files with 1 additions and 1 deletions

View File

@ -146,6 +146,7 @@ static int hnbgw_tx_ue_register_acc(struct ue_context *ue)
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 @@ static int hnbgw_tx_ue_register_acc(struct ue_context *ue)
&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);