hnbap: Free ASN.1 components after they are no longer needed
diff --git a/src/hnbgw_hnbap.c b/src/hnbgw_hnbap.c
index 9378c7a..219169a 100644
--- a/src/hnbgw_hnbap.c
+++ b/src/hnbgw_hnbap.c
@@ -69,6 +69,8 @@
 					       &asn_DEF_HNBRegisterAccept,
 					       &accept_out);
 
+	ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_HNBRegisterAccept, &accept_out);
+
 	return hnbgw_hnbap_tx(ctx, msg);
 }
 
@@ -294,6 +296,8 @@
 
 	rc = _hnbgw_hnbap_rx(hnb, pdu);
 
+	ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_HNBAP_PDU, pdu);
+
 	return rc;
 }