From: wansu.yoo Date: Wed, 20 Oct 2021 10:21:42 +0000 (+0900) Subject: Apply ASN_STRUCT_FREE to release the allocated PDU memory X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?p=sim%2Fe2-interface.git;a=commitdiff_plain;h=91e3b3acf31d53389a9292fff2059f3523eb0179 Apply ASN_STRUCT_FREE to release the allocated PDU memory - It need to be freed the structure including freeing the memory pointed to by pointer itself. Signed-off-by: wansu.yoo Change-Id: I9412bbc1823cb21b210de4019e5f4f5e6f695cdf --- diff --git a/e2sim/src/messagerouting/e2ap_asn1c_codec.c b/e2sim/src/messagerouting/e2ap_asn1c_codec.c old mode 100644 new mode 100755 index 111ca9f..b17431e --- a/e2sim/src/messagerouting/e2ap_asn1c_codec.c +++ b/e2sim/src/messagerouting/e2ap_asn1c_codec.c @@ -179,7 +179,7 @@ int e2ap_asn1c_encode_pdu(E2AP_PDU_t* pdu, unsigned char **buffer) LOG_D("[E2AP ASN] Encoded succesfully, encoded size = %d", len); } - ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_E2AP_PDU, pdu); + ASN_STRUCT_FREE(asn_DEF_E2AP_PDU, pdu); return len; }