From: Balaji Shankaran Date: Mon, 13 Jul 2020 14:47:26 +0000 (+0000) Subject: Merge "Cleanup of dutocurrc container" X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=746426865b5742eb3d79ae2457081c47c1c2c4c1;hp=bda786455110d7444fc56a308a387968f14eb382;p=o-du%2Fl2.git Merge "Cleanup of dutocurrc container" --- diff --git a/src/du_app/du_f1ap_msg_hdl.c b/src/du_app/du_f1ap_msg_hdl.c index 3dc1763f8..c98b9b845 100644 --- a/src/du_app/du_f1ap_msg_hdl.c +++ b/src/du_app/du_f1ap_msg_hdl.c @@ -3656,7 +3656,6 @@ uint8_t BuildSpCellCfgDed(ServingCellConfig_t *srvCellCfg) DU_LOG("\nF1AP : BuildInitialDlBWP failed"); return RFAILED; } - srvCellCfg->downlinkBWP_ToReleaseList = NULLP; srvCellCfg->downlinkBWP_ToAddModList = NULLP; @@ -3693,7 +3692,6 @@ uint8_t BuildSpCellCfgDed(ServingCellConfig_t *srvCellCfg) DU_LOG("\nF1AP : BuildUlCfg failed"); return RFAILED; } - srvCellCfg->supplementaryUplink = NULLP; srvCellCfg->pdcch_ServingCellConfig = NULLP; @@ -3909,6 +3907,379 @@ uint8_t BuildMacCellGrpCfg(MAC_CellGroupConfig_t *macCellGrpCfg) return ROK; } + /******************************************************************* + * + * @brief Frees memeory allocated for SearchSpcToAddModList + * + * @details + * + * Function : FreeSearchSpcToAddModList + * + * Functionality: Deallocating memory of SearchSpcToAddModList + * + * @params[in] struct PDCCH_Config__searchSpacesToAddModList *searchSpcList + * + * @return void + * + 4221 * ****************************************************************/ +void FreeSearchSpcToAddModList(struct PDCCH_Config__searchSpacesToAddModList *searchSpcList) +{ + uint8_t idx1=0; + uint8_t idx2=0; + struct SearchSpace *searchSpc=NULLP; + + if(searchSpcList->list.array) + { + if(searchSpcList->list.array[idx2]) + { + searchSpc = searchSpcList->list.array[idx2]; + if(searchSpc->controlResourceSetId) + { + if(searchSpc->monitoringSlotPeriodicityAndOffset) + { + if(searchSpc->monitoringSymbolsWithinSlot) + { + if(searchSpc->monitoringSymbolsWithinSlot->buf) + { + if(searchSpc->nrofCandidates) + { + if(searchSpc->searchSpaceType) + { + DU_FREE(searchSpc->searchSpaceType->choice.ue_Specific,\ + sizeof(struct SearchSpace__searchSpaceType__ue_Specific)); + DU_FREE(searchSpc->searchSpaceType, sizeof(struct + SearchSpace__searchSpaceType)); + } + DU_FREE(searchSpc->nrofCandidates, + sizeof(struct SearchSpace__nrofCandidates)); + } + DU_FREE(searchSpc->monitoringSymbolsWithinSlot->buf, \ + searchSpc->monitoringSymbolsWithinSlot->size); + } + DU_FREE(searchSpc->monitoringSymbolsWithinSlot, + sizeof(BIT_STRING_t)); + } + DU_FREE(searchSpc->monitoringSlotPeriodicityAndOffset, \ + sizeof(struct SearchSpace__monitoringSlotPeriodicityAndOffset)); + } + DU_FREE(searchSpc->controlResourceSetId, + sizeof(ControlResourceSetId_t)); + } + } + for(idx1 = 0; idx1 < searchSpcList->list.count; idx1++) + { + DU_FREE(searchSpcList->list.array[idx1], + sizeof(struct SearchSpace)); + } + DU_FREE(searchSpcList->list.array,searchSpcList->list.size); + } +} + /******************************************************************* + * + * @brief Frees memory allocated for PdschTimeDomAllocList + * + * @details + * + * Function : FreePdschTimeDomAllocList + * + * Functionality: Deallocating memory of PdschTimeDomAllocList + * + * @params[in] struct PDSCH_Config__pdsch_TimeDomainAllocationList *timeDomAllocList + * + * @return void + * + 4221 * ****************************************************************/ +void FreePdschTimeDomAllocList( struct PDSCH_Config__pdsch_TimeDomainAllocationList *timeDomAllocList) +{ + uint8_t idx1=0; + + if(timeDomAllocList->choice.setup) + { + if(timeDomAllocList->choice.setup->list.array) + { + for(idx1 = 0; idx1 choice.setup->list.count ; idx1++) + { + DU_FREE(timeDomAllocList->choice.setup->list.array[idx1], + sizeof(struct PDSCH_TimeDomainResourceAllocation)); + } + DU_FREE(timeDomAllocList->choice.setup->list.array, \ + timeDomAllocList->choice.setup->list.size); + } + DU_FREE(timeDomAllocList->choice.setup,\ + sizeof(struct PDSCH_TimeDomainResourceAllocationList)); + } +} + /******************************************************************* + * + * @brief Frees memory allocated for PuschTimeDomAllocList + * + *@details + * + * Function : FreePuschTimeDomAllocList + * + * Functionality: Deallocating memory of PuschTimeDomAllocList + * + * @params[in] PUSCH_Config_t *puschCfg + * + * @return void + * + 4221 * ****************************************************************/ +void FreePuschTimeDomAllocList(PUSCH_Config_t *puschCfg) +{ + uint8_t idx1=0; + uint8_t idx2=0; + struct PUSCH_Config__pusch_TimeDomainAllocationList *timeDomAllocList_t=NULLP; + + if(puschCfg->pusch_TimeDomainAllocationList) + { + timeDomAllocList_t=puschCfg->pusch_TimeDomainAllocationList; + if(timeDomAllocList_t->choice.setup) + { + if(timeDomAllocList_t->choice.setup->list.array) + { + DU_FREE(timeDomAllocList_t->choice.setup->list.array[idx2]->k2, sizeof(long)); + for(idx1 = 0; idx1choice.setup->list.count; idx1++) + { + DU_FREE(timeDomAllocList_t->choice.setup->list.array[idx1],\ + sizeof(PUSCH_TimeDomainResourceAllocation_t)); + } + DU_FREE(timeDomAllocList_t->choice.setup->list.array, \ + timeDomAllocList_t->choice.setup->list.size); + } + DU_FREE(timeDomAllocList_t->choice.setup, \ + sizeof(struct PUSCH_TimeDomainResourceAllocationList)); + } + DU_FREE(puschCfg->transformPrecoder, sizeof(long)); + DU_FREE(puschCfg->pusch_TimeDomainAllocationList, \ + sizeof(struct PUSCH_Config__pusch_TimeDomainAllocationList)); + } + +} + /******************************************************************* + * + * @brief Frees memory allocated for InitialUlBWP + * + * @details + * + * Function : FreeInitialUlBWP + * + * Functionality: Deallocating memory of InitialUlBWP + * + * @params[in] BWP_UplinkDedicated_t *ulBwp + * + * @return void + * + * ****************************************************************/ +void FreeInitialUlBWP(BWP_UplinkDedicated_t *ulBwp) +{ + PUSCH_Config_t *puschCfg=NULLP; + struct PUSCH_Config__dmrs_UplinkForPUSCH_MappingTypeA *dmrsUlCfg=NULLP; + + if(ulBwp->pusch_Config) + { + if(ulBwp->pusch_Config->choice.setup) + { + puschCfg=ulBwp->pusch_Config->choice.setup; + if(puschCfg->dataScramblingIdentityPUSCH) + { + if(puschCfg->dmrs_UplinkForPUSCH_MappingTypeA) + { + FreePuschTimeDomAllocList(puschCfg); + dmrsUlCfg=puschCfg->dmrs_UplinkForPUSCH_MappingTypeA; + if(dmrsUlCfg->choice.setup) + { + if(dmrsUlCfg->choice.setup->dmrs_AdditionalPosition) + { + if(dmrsUlCfg->choice.setup->transformPrecodingDisabled) + { + DU_FREE(dmrsUlCfg->choice.setup->transformPrecodingDisabled->scramblingID0,\ + sizeof(long)); + DU_FREE(dmrsUlCfg->choice.setup->transformPrecodingDisabled, + sizeof(struct DMRS_UplinkConfig__transformPrecodingDisabled)); + } + DU_FREE(dmrsUlCfg->choice.setup->dmrs_AdditionalPosition, + sizeof(long)); + } + DU_FREE(dmrsUlCfg->choice.setup,sizeof(DMRS_UplinkConfig_t)); + } + DU_FREE(puschCfg->dmrs_UplinkForPUSCH_MappingTypeA, \ + sizeof(struct PUSCH_Config__dmrs_UplinkForPUSCH_MappingTypeA)); + } + DU_FREE(puschCfg->dataScramblingIdentityPUSCH, sizeof(long)); + } + DU_FREE(ulBwp->pusch_Config->choice.setup, sizeof(PUSCH_Config_t)); + } + DU_FREE(ulBwp->pusch_Config, sizeof(struct BWP_UplinkDedicated__pusch_Config)); + } +} + /******************************************************************* + * + * @brief Frees memory allocated for initialUplinkBWP + * + * @details + * + * Function : FreeinitialUplinkBWP + * + * Functionality: Deallocating memory of initialUplinkBWP + * + * @params[in] UplinkConfig_t *ulCfg + * + * @return void + * + * + * ****************************************************************/ +void FreeinitialUplinkBWP(UplinkConfig_t *ulCfg) +{ + BWP_UplinkDedicated_t *ulBwp=NULLP; + struct UplinkConfig__pusch_ServingCellConfig *puschCfg=NULLP; + + if(ulCfg->initialUplinkBWP) + { + ulBwp=ulCfg->initialUplinkBWP; + if(ulCfg->firstActiveUplinkBWP_Id) + { + if(ulCfg->pusch_ServingCellConfig) + { + puschCfg=ulCfg->pusch_ServingCellConfig; + if(puschCfg->choice.setup) + { + if(puschCfg->choice.setup->ext1) + { + DU_FREE(puschCfg->choice.setup->ext1->\ + processingType2Enabled,sizeof(BOOLEAN_t)); + DU_FREE(puschCfg->choice.setup->ext1->\ + maxMIMO_Layers,sizeof(long)); + DU_FREE(puschCfg->choice.setup->ext1, \ + sizeof(struct PUSCH_ServingCellConfig__ext1)); + } + DU_FREE(puschCfg->choice.setup, sizeof(struct PUSCH_ServingCellConfig)); + } + DU_FREE(ulCfg->pusch_ServingCellConfig, sizeof(struct UplinkConfig__pusch_ServingCellConfig)); + } + DU_FREE(ulCfg->firstActiveUplinkBWP_Id, sizeof(BWP_Id_t)); + } + FreeInitialUlBWP(ulBwp); + DU_FREE(ulCfg->initialUplinkBWP, sizeof(BWP_UplinkDedicated_t)); + } +} + /******************************************************************* + * + * @brief Frees emmory allocated for BWPDlDedPdschCfg + * + * @details + * + * Function : FreeBWPDlDedPdschCfg + * + * Functionality: Deallocating memory of BWPDlDedPdschCfg + * + * @params[in] BWP_DownlinkDedicated_t *dlBwp + * + * @return void + * + * + * ****************************************************************/ +void FreeBWPDlDedPdschCfg(BWP_DownlinkDedicated_t *dlBwp) +{ + struct PDSCH_Config *pdschCfg=NULLP; + struct PDSCH_Config__prb_BundlingType *prbBndlType=NULLP; + struct PDSCH_Config__pdsch_TimeDomainAllocationList *timeDomAllocList=NULLP; + struct PDSCH_Config__dmrs_DownlinkForPDSCH_MappingTypeA *dmrsDlCfg=NULLP; + + if(dlBwp->pdsch_Config->choice.setup) + { + pdschCfg=dlBwp->pdsch_Config->choice.setup; + if(pdschCfg->dmrs_DownlinkForPDSCH_MappingTypeA) + { + if(pdschCfg->pdsch_TimeDomainAllocationList) + { + timeDomAllocList=pdschCfg->pdsch_TimeDomainAllocationList; + if(pdschCfg->maxNrofCodeWordsScheduledByDCI) + { + prbBndlType=&pdschCfg->prb_BundlingType; + DU_FREE(prbBndlType->choice.staticBundling,\ + sizeof(struct PDSCH_Config__prb_BundlingType__staticBundling)); + DU_FREE(pdschCfg->maxNrofCodeWordsScheduledByDCI, sizeof(long)); + } + FreePdschTimeDomAllocList(timeDomAllocList); + DU_FREE(pdschCfg->pdsch_TimeDomainAllocationList, \ + sizeof(struct PDSCH_Config__pdsch_TimeDomainAllocationList)); + } + dmrsDlCfg=pdschCfg->dmrs_DownlinkForPDSCH_MappingTypeA; + if(dmrsDlCfg->choice.setup) + { + DU_FREE(dmrsDlCfg->choice.setup->dmrs_AdditionalPosition, + sizeof(long)); + DU_FREE(dmrsDlCfg->choice.setup, sizeof(struct DMRS_DownlinkConfig)); + } + DU_FREE(pdschCfg->dmrs_DownlinkForPDSCH_MappingTypeA, \ + sizeof(struct PDSCH_Config__dmrs_DownlinkForPDSCH_MappingTypeA)); + } + DU_FREE(dlBwp->pdsch_Config->choice.setup, sizeof(struct PDSCH_Config)); + } +} + /******************************************************************* + * + * @brief Frees emmory allocated for BWPDlDedPdcchCfg + * + * @details + * + * Function : FreeBWPDlDedPdcchCfg + * + * Functionality: Deallocating memory of BWPDlDedPdcchCfg + * + * @params[in] BWP_DownlinkDedicated_t *dlBwp + * + * @return void + * + * + * ****************************************************************/ +void FreeBWPDlDedPdcchCfg(BWP_DownlinkDedicated_t *dlBwp) +{ + uint8_t idx1=0; + uint8_t idx2=0; + struct PDCCH_Config *pdcchCfg=NULLP; + struct ControlResourceSet *controlRSet=NULLP; + struct PDCCH_Config__controlResourceSetToAddModList *controlRSetList=NULLP; + + if(dlBwp->pdcch_Config->choice.setup) + { + pdcchCfg=dlBwp->pdcch_Config->choice.setup; + if(pdcchCfg->controlResourceSetToAddModList) + { + controlRSetList = pdcchCfg->controlResourceSetToAddModList; + if(controlRSetList->list.array) + { + controlRSet = controlRSetList->list.array[idx2]; + if(controlRSet) + { + if(controlRSet->frequencyDomainResources.buf) + { + if(controlRSet->pdcch_DMRS_ScramblingID) + { + if(pdcchCfg->searchSpacesToAddModList) + { + FreeSearchSpcToAddModList(pdcchCfg->searchSpacesToAddModList); + DU_FREE(pdcchCfg->searchSpacesToAddModList, \ + sizeof(struct PDCCH_Config__searchSpacesToAddModList)); + } + DU_FREE(controlRSet->pdcch_DMRS_ScramblingID, sizeof(long)); + } + DU_FREE(controlRSet->frequencyDomainResources.buf, \ + controlRSet->frequencyDomainResources.size); + } + } + for(idx1 = 0; idx1 list.count; idx1++) + { + DU_FREE(controlRSetList->list.array[idx1], sizeof(struct ControlResourceSet)); + } + DU_FREE(controlRSetList->list.array, controlRSetList->list.size); + } + DU_FREE(pdcchCfg->controlResourceSetToAddModList, \ + sizeof(struct PDCCH_Config__controlResourceSetToAddModList)); + } + DU_FREE(dlBwp->pdcch_Config->choice.setup, sizeof(struct PDCCH_Config)); + } +} /******************************************************************* * @@ -3918,7 +4289,7 @@ uint8_t BuildMacCellGrpCfg(MAC_CellGroupConfig_t *macCellGrpCfg) * * Function : FreeMemDuToCuRrcCont * - * Functionality: Builds DuToCuRrcContainer + * Functionality: Deallocating memory of DuToCuRrcContainer * * @params[in] DuToCuRRCContainer, DuToCuRRCContainer * @@ -3928,19 +4299,21 @@ uint8_t BuildMacCellGrpCfg(MAC_CellGroupConfig_t *macCellGrpCfg) * ****************************************************************/ uint8_t FreeMemDuToCuRrcCont(CellGroupConfigRrc_t *cellGrpCfg) { - uint8_t idx; - struct CellGroupConfigRrc__rlc_BearerToAddModList *rlcBearerList; - struct RLC_Config *rlcConfig; - struct LogicalChannelConfig *macLcConfig; - MAC_CellGroupConfig_t *macCellGrpCfg; - struct SchedulingRequestConfig *schedulingRequestConfig; - struct SchedulingRequestConfig__schedulingRequestToAddModList *schReqList; - struct TAG_Config *tagConfig; - struct TAG_Config__tag_ToAddModList *tagList; - struct MAC_CellGroupConfig__phr_Config *phrConfig; - PhysicalCellGroupConfig_t *phyCellGrpCfg; - SpCellConfig_t *spCellCfg; - ServingCellConfig_t *srvCellCfg; + uint8_t idx=0; + SpCellConfig_t *spCellCfg=NULLP; + ServingCellConfig_t *srvCellCfg=NULLP; + BWP_DownlinkDedicated_t *dlBwp=NULLP; + MAC_CellGroupConfig_t *macCellGrpCfg=NULLP; + PhysicalCellGroupConfig_t *phyCellGrpCfg=NULLP; + struct CellGroupConfigRrc__rlc_BearerToAddModList *rlcBearerList=NULLP; + struct RLC_Config *rlcConfig=NULLP; + struct LogicalChannelConfig *macLcConfig=NULLP; + struct SchedulingRequestConfig *schedulingRequestConfig=NULLP; + struct SchedulingRequestConfig__schedulingRequestToAddModList *schReqList=NULLP; + struct TAG_Config *tagConfig=NULLP; + struct TAG_Config__tag_ToAddModList *tagList=NULLP; + struct MAC_CellGroupConfig__phr_Config *phrConfig=NULLP; + struct ServingCellConfig__pdsch_ServingCellConfig *pdschCfg=NULLP; rlcBearerList = cellGrpCfg->rlc_BearerToAddModList; if(rlcBearerList) @@ -3949,30 +4322,33 @@ uint8_t FreeMemDuToCuRrcCont(CellGroupConfigRrc_t *cellGrpCfg) { for(idx=0; idxlist.count; idx++) { - rlcConfig = rlcBearerList->list.array[idx]->rlc_Config; - macLcConfig = rlcBearerList->list.array[idx]->mac_LogicalChannelConfig; - if(rlcConfig) - { - if(rlcConfig->choice.am) - { - DU_FREE(rlcConfig->choice.am->ul_AM_RLC.sn_FieldLength, sizeof(SN_FieldLengthAM_t)); - DU_FREE(rlcConfig->choice.am->dl_AM_RLC.sn_FieldLength, sizeof(SN_FieldLengthAM_t)); - DU_FREE(rlcConfig->choice.am, sizeof(struct RLC_Config__am)); - } - DU_FREE(rlcConfig, sizeof(struct RLC_Config)); - } - DU_FREE(rlcBearerList->list.array[idx]->servedRadioBearer, sizeof(struct RLC_BearerConfig__servedRadioBearer)); - if(macLcConfig) - { - if(macLcConfig->ul_SpecificParameters) - { - DU_FREE(macLcConfig->ul_SpecificParameters->schedulingRequestID, sizeof(SchedulingRequestId_t)); - DU_FREE(macLcConfig->ul_SpecificParameters->logicalChannelGroup, sizeof(long)); - DU_FREE(macLcConfig->ul_SpecificParameters, sizeof(struct LogicalChannelConfig__ul_SpecificParameters)); + if(rlcBearerList->list.array[idx]) + { + rlcConfig = rlcBearerList->list.array[idx]->rlc_Config; + macLcConfig = rlcBearerList->list.array[idx]->mac_LogicalChannelConfig; + if(rlcConfig) + { + if(rlcConfig->choice.am) + { + DU_FREE(rlcConfig->choice.am->ul_AM_RLC.sn_FieldLength, sizeof(SN_FieldLengthAM_t)); + DU_FREE(rlcConfig->choice.am->dl_AM_RLC.sn_FieldLength, sizeof(SN_FieldLengthAM_t)); + DU_FREE(rlcConfig->choice.am, sizeof(struct RLC_Config__am)); + } + DU_FREE(rlcConfig, sizeof(struct RLC_Config)); + } + DU_FREE(rlcBearerList->list.array[idx]->servedRadioBearer, sizeof(struct RLC_BearerConfig__servedRadioBearer)); + if(macLcConfig) + { + if(macLcConfig->ul_SpecificParameters) + { + DU_FREE(macLcConfig->ul_SpecificParameters->schedulingRequestID, sizeof(SchedulingRequestId_t)); + DU_FREE(macLcConfig->ul_SpecificParameters->logicalChannelGroup, sizeof(long)); + DU_FREE(macLcConfig->ul_SpecificParameters, sizeof(struct LogicalChannelConfig__ul_SpecificParameters)); + } + DU_FREE(rlcBearerList->list.array[idx]->mac_LogicalChannelConfig, sizeof(struct LogicalChannelConfig)); } - DU_FREE(rlcBearerList->list.array[idx]->mac_LogicalChannelConfig, sizeof(struct LogicalChannelConfig)); - } - DU_FREE(rlcBearerList->list.array[idx], sizeof(struct RLC_BearerConfig)); + DU_FREE(rlcBearerList->list.array[idx], sizeof(struct RLC_BearerConfig)); + } } DU_FREE(rlcBearerList->list.array, rlcBearerList->list.size); } @@ -3983,11 +4359,10 @@ uint8_t FreeMemDuToCuRrcCont(CellGroupConfigRrc_t *cellGrpCfg) if(macCellGrpCfg) { schedulingRequestConfig = macCellGrpCfg->schedulingRequestConfig; - schReqList = schedulingRequestConfig->schedulingRequestToAddModList; - if(schedulingRequestConfig) { - if(schReqList) + schReqList = schedulingRequestConfig->schedulingRequestToAddModList; + if(schReqList) { if(schReqList->list.array) { @@ -4005,17 +4380,15 @@ uint8_t FreeMemDuToCuRrcCont(CellGroupConfigRrc_t *cellGrpCfg) sizeof(struct SchedulingRequestConfig__schedulingRequestToAddModList)); } DU_FREE(macCellGrpCfg->schedulingRequestConfig, sizeof(struct SchedulingRequestConfig)); } - if(macCellGrpCfg->bsr_Config) { DU_FREE(macCellGrpCfg->bsr_Config, sizeof(struct BSR_Config)); } - tagConfig = macCellGrpCfg->tag_Config; - tagList = tagConfig->tag_ToAddModList; if(tagConfig) { - if(tagList) + tagList = tagConfig->tag_ToAddModList; + if(tagList) { if(tagList->list.array) { @@ -4027,7 +4400,7 @@ uint8_t FreeMemDuToCuRrcCont(CellGroupConfigRrc_t *cellGrpCfg) } DU_FREE(tagConfig->tag_ToAddModList, sizeof(struct TAG_Config__tag_ToAddModList)); } - DU_FREE(tagConfig, sizeof(struct TAG_Config)); + DU_FREE(tagConfig, sizeof(struct TAG_Config)); } phrConfig = macCellGrpCfg->phr_Config; @@ -4050,21 +4423,59 @@ uint8_t FreeMemDuToCuRrcCont(CellGroupConfigRrc_t *cellGrpCfg) spCellCfg = cellGrpCfg->spCellConfig; if(spCellCfg) { - DU_FREE(spCellCfg->servCellIndex, sizeof(long)); - DU_FREE(spCellCfg->rlmInSyncOutOfSyncThreshold, sizeof(long)); - - srvCellCfg = spCellCfg->spCellConfigDedicated; - if(srvCellCfg) + if(spCellCfg->servCellIndex) { - DU_FREE(srvCellCfg->initialDownlinkBWP, sizeof(BWP_DownlinkDedicated_t)); - DU_FREE(srvCellCfg->firstActiveDownlinkBWP_Id, sizeof(long)); - DU_FREE(srvCellCfg->defaultDownlinkBWP_Id, sizeof(long)); - DU_FREE(srvCellCfg->uplinkConfig, sizeof(UplinkConfig_t)); - DU_FREE(srvCellCfg->pdsch_ServingCellConfig, sizeof(struct ServingCellConfig__pdsch_ServingCellConfig)); - DU_FREE(srvCellCfg->csi_MeasConfig, sizeof(struct ServingCellConfig__csi_MeasConfig)); - DU_FREE(spCellCfg->spCellConfigDedicated, sizeof(ServingCellConfig_t)); - } - DU_FREE(spCellCfg, sizeof(SpCellConfig_t)); + if(spCellCfg->rlmInSyncOutOfSyncThreshold) + { + if(spCellCfg->spCellConfigDedicated) + { + srvCellCfg = spCellCfg->spCellConfigDedicated; + if(srvCellCfg->initialDownlinkBWP) + { + dlBwp = srvCellCfg->initialDownlinkBWP; + if(srvCellCfg->firstActiveDownlinkBWP_Id) + { + if(srvCellCfg->defaultDownlinkBWP_Id) + { + if(srvCellCfg->uplinkConfig) + { + if(srvCellCfg->pdsch_ServingCellConfig) + { + pdschCfg= srvCellCfg->pdsch_ServingCellConfig; + if(pdschCfg->choice.setup) + { + DU_FREE(pdschCfg->choice.setup->nrofHARQ_ProcessesForPDSCH,sizeof(long)); + DU_FREE(pdschCfg->choice.setup, sizeof( struct PDSCH_ServingCellConfig)); + } + DU_FREE(srvCellCfg->pdsch_ServingCellConfig, sizeof(struct + ServingCellConfig__pdsch_ServingCellConfig)); + } + FreeinitialUplinkBWP(srvCellCfg->uplinkConfig); + DU_FREE(srvCellCfg->uplinkConfig, sizeof(UplinkConfig_t)); + } + DU_FREE(srvCellCfg->defaultDownlinkBWP_Id, sizeof(long)); + } + DU_FREE(srvCellCfg->firstActiveDownlinkBWP_Id, sizeof(long)); + } + if(dlBwp->pdcch_Config) + { + if(dlBwp->pdsch_Config) + { + FreeBWPDlDedPdschCfg(dlBwp); + DU_FREE(dlBwp->pdsch_Config, sizeof(struct BWP_DownlinkDedicated__pdsch_Config)); + } + FreeBWPDlDedPdcchCfg(dlBwp); + DU_FREE(dlBwp->pdcch_Config, sizeof(struct BWP_DownlinkDedicated__pdcch_Config)); + } + DU_FREE(srvCellCfg->initialDownlinkBWP, sizeof(BWP_DownlinkDedicated_t)); + } + DU_FREE(spCellCfg->spCellConfigDedicated, sizeof(ServingCellConfig_t)); + } + DU_FREE(spCellCfg->rlmInSyncOutOfSyncThreshold, sizeof(long)); + } + DU_FREE(spCellCfg->servCellIndex, sizeof(long)); + } + DU_FREE(spCellCfg,sizeof(SpCellConfig_t)); } return ROK; }