Change memory allocation from heap to stack
[sim/e2-interface.git] / e2sim / src / messagerouting / e2ap_message_handler.cpp
old mode 100644 (file)
new mode 100755 (executable)
index 3ecc2f0..81aa780
@@ -246,7 +246,7 @@ void e2ap_handle_E2SeviceRequest(E2AP_PDU_t* pdu, int &socket_fd, E2Sim *e2sim)
 \r
   sctp_buffer_t data;\r
 \r
-  char *error_buf = (char*)calloc(300, sizeof(char));\r
+  char error_buf[300] = {0, };\r
   size_t errlen;\r
 \r
   asn_check_constraints(&asn_DEF_E2AP_PDU, res_pdu, error_buf, &errlen);\r