diff --git a/openair-cn/MME_APP/mme_app_main.c b/openair-cn/MME_APP/mme_app_main.c index 4e42f77c82..390bc0a2ff 100644 --- a/openair-cn/MME_APP/mme_app_main.c +++ b/openair-cn/MME_APP/mme_app_main.c @@ -107,7 +107,7 @@ void *mme_app_thread(void *args) ITTI_MSG_ID(received_message_p), ITTI_MSG_NAME(received_message_p)); } break; } - free(received_message_p); + itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), received_message_p); received_message_p = NULL; } return NULL; diff --git a/openair-cn/NAS/nas_main.c b/openair-cn/NAS/nas_main.c index fc4c93f970..84cd68bb32 100644 --- a/openair-cn/NAS/nas_main.c +++ b/openair-cn/NAS/nas_main.c @@ -168,7 +168,7 @@ next_message: ITTI_MSG_NAME(received_message_p)); } break; } - free(received_message_p); + itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), received_message_p); received_message_p = NULL; } return NULL;