From 5e5d17b05bdab441410d0556ab832d14d6cb4fab Mon Sep 17 00:00:00 2001 From: Guido Casati Date: Wed, 16 Oct 2024 19:53:24 +0200 Subject: [PATCH] Free F1 Setup Response in the context where it was allocated --- openair2/F1AP/f1ap_du_interface_management.c | 2 ++ openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openair2/F1AP/f1ap_du_interface_management.c b/openair2/F1AP/f1ap_du_interface_management.c index 85e963ea6a..8f6114a9e5 100644 --- a/openair2/F1AP/f1ap_du_interface_management.c +++ b/openair2/F1AP/f1ap_du_interface_management.c @@ -186,6 +186,8 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint } LOG_D(F1AP, "Sending F1AP_SETUP_RESP ITTI message\n"); f1_setup_response(&resp); + // free F1AP message after use + free_f1ap_setup_response(&resp); return 0; } diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c b/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c index 407e5869ce..51c655c791 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c +++ b/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c @@ -172,8 +172,6 @@ void f1_setup_response(const f1ap_setup_resp_t *resp) AssertFatal(mac->f1_config.setup_resp != NULL, "out of memory\n"); // Copy F1AP message *mac->f1_config.setup_resp = cp_f1ap_setup_response(resp); - // free F1AP message after copy - free_f1ap_setup_response(resp); NR_SCHED_UNLOCK(&mac->sched_lock); // NOTE: Before accepting any UEs, we should initialize the UE states.