Apply ASN_STRUCT_FREE to release the allocated PDU memory 96/6896/1
authorwansu.yoo <wansu.yoo@samsung.com>
Wed, 20 Oct 2021 10:21:42 +0000 (19:21 +0900)
committerwansu.yoo <wansu.yoo@samsung.com>
Wed, 20 Oct 2021 10:21:42 +0000 (19:21 +0900)
- It need to be freed the structure including freeing the memory
pointed to by pointer itself.

Signed-off-by: wansu.yoo <wansu.yoo@samsung.com>
Change-Id: I9412bbc1823cb21b210de4019e5f4f5e6f695cdf

e2sim/src/messagerouting/e2ap_asn1c_codec.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 111ca9f..b17431e
@@ -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;
 }