fix: avoid freeing rlc config structure

This commit is contained in:
sriharsha
2023-11-16 09:07:05 +01:00
committed by Sriharsha Korada
parent e5ab3e022e
commit f248b2fdff
4 changed files with 9 additions and 7 deletions
+1 -1
View File
@@ -649,7 +649,7 @@ void nr_rrc_mac_config_req_ue_logicalChannelBearer(module_id_t module_id,
}
// reorder the logical channels as per its priority
qsort_r((void *)mac->lc_ordered_info.lcids_ordered, rlc_toadd_list->list.count, sizeof(uint32_t), lcid_cmp, (void *)mac);
qsort_r(mac->lc_ordered_info.lcids_ordered, rlc_toadd_list->list.count, sizeof(uint32_t), lcid_cmp, mac);
for (uint8_t i = 0; i < rlc_toadd_list->list.count; i++) {
mac->lc_ordered_info.logicalChannelConfig_ordered[i] = mac->logicalChannelConfig[mac->lc_ordered_info.lcids_ordered[i] - 1];
}
+1 -1
View File
@@ -106,7 +106,7 @@ NR_UE_MAC_INST_t * nr_l2_init_ue(NR_UE_RRC_INST_t* rrc_inst) {
nr_rrc_mac_config_req_ue_logicalChannelBearer(0, &rlc_toadd_list, NULL);
// free memory
free_nr_noS1_bearer_config(&rbconfig, &rlc_rbconfig);
free_nr_noS1_bearer_config(&rbconfig, NULL);
}
}
else {
+3 -3
View File
@@ -3072,9 +3072,9 @@ uint8_t nr_ue_get_sdu(module_id_t module_idP,
for (uint8_t id = 0; id < avail_lcids_count; id++) {
/*
loop over all logical channels in the order of priority. As stated in ts spec, in the first run, only prioritized
number of bytes are taken out from the correspondinf RLC buffers of all active logical channels and if there is still
space availble in the MAC PDU, then from the next run all the remaining data from the higher priority logical channel
loop over all logical channels in the order of priority. As stated in TS138.321 Section 5.4.3.1, in the first run, only
prioritized number of bytes are taken out from the corresponding RLC buffers of all active logical channels and if there is
still space availble in the MAC PDU, then from the next run all the remaining data from the higher priority logical channel
is placed in the MAC PDU before going on to next high priority logical channel
*/
int lcid = lcids_bj_pos[id];
+4 -2
View File
@@ -460,8 +460,10 @@ void free_nr_noS1_bearer_config(NR_RadioBearerConfig_t **rbconfig,
{
ASN_STRUCT_FREE(asn_DEF_NR_RadioBearerConfig, *rbconfig);
*rbconfig = NULL;
ASN_STRUCT_FREE(asn_DEF_NR_RLC_BearerConfig, *rlc_rbconfig);
*rlc_rbconfig = NULL;
if (rlc_rbconfig != NULL) {
ASN_STRUCT_FREE(asn_DEF_NR_RLC_BearerConfig, *rlc_rbconfig);
*rlc_rbconfig = NULL;
}
}
//------------------------------------------------------------------------------