Free F1 Setup Response in the context where it was allocated

This commit is contained in:
Guido Casati
2024-10-24 16:22:03 +02:00
parent a29cbf0543
commit 5e5d17b05b
2 changed files with 2 additions and 2 deletions
@@ -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;
}
@@ -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.