Commit 5e5d17b0 authored by Guido Casati's avatar Guido Casati

Free F1 Setup Response in the context where it was allocated

parent a29cbf05
...@@ -186,6 +186,8 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance, sctp_assoc_t assoc_id, uint ...@@ -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"); LOG_D(F1AP, "Sending F1AP_SETUP_RESP ITTI message\n");
f1_setup_response(&resp); f1_setup_response(&resp);
// free F1AP message after use
free_f1ap_setup_response(&resp);
return 0; return 0;
} }
......
...@@ -172,8 +172,6 @@ void f1_setup_response(const f1ap_setup_resp_t *resp) ...@@ -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"); AssertFatal(mac->f1_config.setup_resp != NULL, "out of memory\n");
// Copy F1AP message // Copy F1AP message
*mac->f1_config.setup_resp = cp_f1ap_setup_response(resp); *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); NR_SCHED_UNLOCK(&mac->sched_lock);
// NOTE: Before accepting any UEs, we should initialize the UE states. // NOTE: Before accepting any UEs, we should initialize the UE states.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment