+*
+* @params[in] GNB_DU_Served_Cells_List_t *duServedCell
+*
+* @return void
+*
+* ****************************************************************/
+void FreeServedCellList( GNB_DU_Served_Cells_List_t *duServedCell)
+{
+ U8 plmnCnt=1;
+ U8 servId=0;
+ U8 sliceId=0;
+ U8 ieId=0;
+ U8 extensionCnt=1;
+ U8 plmnidx=0;
+ GNB_DU_Served_Cells_Item_t *srvCellItem= &duServedCell->list.array[0]->value.choice.GNB_DU_Served_Cells_Item;
+ if(duServedCell->list.array!=NULLP)
+ {
+ if(duServedCell->list.array[0]!=NULLP)
+ {
+ if(srvCellItem->served_Cell_Information.nRCGI.pLMN_Identity.buf!=NULLP)
+ {
+ if(srvCellItem->served_Cell_Information.nRCGI.nRCellIdentity.buf !=NULLP)
+ {
+ if(srvCellItem->served_Cell_Information.fiveGS_TAC!=NULLP)
+ {
+ if(srvCellItem->served_Cell_Information.fiveGS_TAC->buf!=NULLP)
+ {
+ if(srvCellItem->served_Cell_Information.servedPLMNs.list.array!=NULLP)
+ {
+ if(srvCellItem->served_Cell_Information.servedPLMNs.list.array[0]!=NULLP)
+ {
+ if(srvCellItem->served_Cell_Information.servedPLMNs.list.array[servId]->pLMN_Identity.buf!=NULLP)
+ {
+ if(srvCellItem->served_Cell_Information.servedPLMNs.list.array[servId]->iE_Extensions!=NULLP)
+ {
+ if(srvCellItem->served_Cell_Information.servedPLMNs.list.array[servId]->iE_Extensions->list.array!=NULLP)
+ {
+ if(srvCellItem->served_Cell_Information.servedPLMNs.list.array[servId]->iE_Extensions->list.array[0]!=NULLP)
+ {
+ if(srvCellItem->served_Cell_Information.servedPLMNs.list.array[servId]->iE_Extensions->list.array[0]->\
+ extensionValue.choice.SliceSupportList.list.array!=NULLP)
+ {
+ if(srvCellItem->served_Cell_Information.servedPLMNs.list.array[servId]->iE_Extensions->list.array[0]->\
+ extensionValue.choice.SliceSupportList.list.array[sliceId]!= NULLP)
+ {
+ if(srvCellItem->served_Cell_Information.servedPLMNs.list.array[servId]->iE_Extensions->list.array[0]->\
+ extensionValue.choice.SliceSupportList.list.array[sliceId]->sNSSAI.sST.buf!=NULLP)
+ {
+ if(srvCellItem->served_Cell_Information.servedPLMNs.list.array[servId]->iE_Extensions->list.array[0]->\
+ extensionValue.choice.SliceSupportList.list.array[sliceId]->sNSSAI.sD!=NULLP)
+ {
+ if(srvCellItem->served_Cell_Information.servedPLMNs.list.array[servId]->iE_Extensions->\
+ list.array[0]->extensionValue.choice.SliceSupportList.list.array[sliceId]->sNSSAI.sD->buf!=NULLP)
+ {
+ if(srvCellItem->served_Cell_Information.nR_Mode_Info.choice.fDD!=NULLP)
+ {
+ if(srvCellItem->served_Cell_Information.nR_Mode_Info.choice.fDD->uL_NRFreqInfo.\
+ freqBandListNr.list.array!=NULLP)
+ {
+ if(srvCellItem->served_Cell_Information.nR_Mode_Info.choice.fDD->uL_NRFreqInfo.\
+ freqBandListNr.list.array[0]!=NULLP)
+ {
+ if(srvCellItem->served_Cell_Information.nR_Mode_Info.choice.fDD->dL_NRFreqInfo.\
+ freqBandListNr.list.array)
+ {
+ if(srvCellItem->served_Cell_Information.nR_Mode_Info.choice.fDD->dL_NRFreqInfo.\
+ freqBandListNr.list.array[0]!=NULLP)
+ {
+ if(srvCellItem->served_Cell_Information.measurementTimingConfiguration.buf!=NULLP)
+ {
+ if(!srvCellItem->gNB_DU_System_Information)
+ {
+ if(srvCellItem->gNB_DU_System_Information->mIB_message.buf!=NULLP)
+ {
+ if(srvCellItem->gNB_DU_System_Information->sIB1_message.buf!=NULLP)
+ {
+ DU_FREE(srvCellItem->gNB_DU_System_Information->sIB1_message.buf,\
+ srvCellItem->gNB_DU_System_Information->sIB1_message.size);
+ DU_FREE(duCfgParam.srvdCellLst[0].duSysInfo.sib1Msg,\
+ srvCellItem->gNB_DU_System_Information->sIB1_message.size);
+ }
+ DU_FREE(srvCellItem->gNB_DU_System_Information->mIB_message.buf,\
+ srvCellItem->gNB_DU_System_Information->mIB_message.size);
+ DU_FREE(duCfgParam.srvdCellLst[0].duSysInfo.mibMsg,\
+ strlen((char*)duCfgParam.srvdCellLst[0].duSysInfo.mibMsg));
+ }
+ DU_FREE(srvCellItem->gNB_DU_System_Information,sizeof(GNB_DU_System_Information_t));
+ }
+ DU_FREE(srvCellItem->served_Cell_Information.measurementTimingConfiguration.buf,\
+ srvCellItem->served_Cell_Information.measurementTimingConfiguration.size);
+ }
+ DU_FREE(srvCellItem->served_Cell_Information.nR_Mode_Info.choice.fDD->dL_NRFreqInfo.\
+ freqBandListNr.list.array[0],sizeof(FreqBandNrItem_t));
+ }
+ DU_FREE(srvCellItem->served_Cell_Information.nR_Mode_Info.choice.fDD->dL_NRFreqInfo.\
+ freqBandListNr.list.array,sizeof(FreqBandNrItem_t *));
+ }
+ DU_FREE(srvCellItem->served_Cell_Information.nR_Mode_Info.choice.fDD->uL_NRFreqInfo.freqBandListNr.\
+ list.array[0],sizeof(FreqBandNrItem_t));
+ }
+ DU_FREE(srvCellItem->served_Cell_Information.nR_Mode_Info.choice.fDD->uL_NRFreqInfo.freqBandListNr.\
+ list.array,sizeof(FreqBandNrItem_t*));
+ }
+ DU_FREE(srvCellItem->served_Cell_Information.nR_Mode_Info.choice.fDD,sizeof(FDD_Info_t));
+ }
+ DU_FREE(srvCellItem->served_Cell_Information.servedPLMNs.list.array[servId]->\
+ iE_Extensions->list.array[ieId]->extensionValue.choice.SliceSupportList.list.array[sliceId]->\
+ sNSSAI.sD->buf,srvCellItem->served_Cell_Information.servedPLMNs.list.array[servId]->iE_Extensions->
+ list.array[ieId]->extensionValue.choice.SliceSupportList.list.array[sliceId]->sNSSAI.sD->size);
+ }
+ DU_FREE(srvCellItem->served_Cell_Information.servedPLMNs.list.array[servId]->\
+ iE_Extensions->list.array[ieId]->extensionValue.choice.SliceSupportList.\
+ list.array[sliceId]->sNSSAI.sD,sizeof(OCTET_STRING_t));
+ }
+ DU_FREE(srvCellItem->served_Cell_Information.servedPLMNs.list.array[servId]->\
+ iE_Extensions->list.array[ieId]->extensionValue.choice.SliceSupportList.list.array[sliceId]->\
+ sNSSAI.sST.buf,sizeof(U8));
+ }
+ DU_FREE(srvCellItem->served_Cell_Information.servedPLMNs.list.array[servId]->iE_Extensions->list.array[0]->\
+ extensionValue.choice.SliceSupportList.list.array[sliceId],sizeof(SliceSupportItem_t));
+ }
+ DU_FREE(srvCellItem->served_Cell_Information.servedPLMNs.list.array[servId]->iE_Extensions->list.array[0]->\
+ extensionValue.choice.SliceSupportList.list.array,sizeof(SliceSupportItem_t*));
+ }
+ DU_FREE(srvCellItem->served_Cell_Information.servedPLMNs.list.\
+ array[servId]->iE_Extensions->list.array[plmnidx],sizeof(ServedPLMNs_ItemExtIEs_t));
+ }
+ DU_FREE(srvCellItem->served_Cell_Information.servedPLMNs.list.\
+ array[servId]->iE_Extensions->list.array,\
+ extensionCnt*sizeof(ServedPLMNs_ItemExtIEs_t*));
+ }
+ DU_FREE(srvCellItem->served_Cell_Information.servedPLMNs.list.\
+ array[servId]->iE_Extensions,sizeof(ProtocolExtensionContainer_4624P3_t));
+ }
+ DU_FREE(srvCellItem->served_Cell_Information.servedPLMNs.list.\
+ array[servId]->pLMN_Identity.buf,srvCellItem->served_Cell_Information.\
+ servedPLMNs.list.array[servId]->pLMN_Identity.size
+ * sizeof(U8));
+ }
+ DU_FREE(srvCellItem->served_Cell_Information.servedPLMNs.list.array[plmnidx],\
+ sizeof(ServedPLMNs_Item_t *));
+ }
+ DU_FREE(srvCellItem->served_Cell_Information.servedPLMNs.list.array,\
+ sizeof(ServedPLMNs_Item_t *));
+ }
+ DU_FREE(srvCellItem->served_Cell_Information.fiveGS_TAC->buf,\
+ sizeof(srvCellItem->served_Cell_Information.fiveGS_TAC->size));
+ }
+ DU_FREE(srvCellItem->served_Cell_Information.fiveGS_TAC,sizeof(FiveGS_TAC_t));
+ }
+ DU_FREE(srvCellItem->served_Cell_Information.nRCGI.nRCellIdentity.buf,\
+ srvCellItem->served_Cell_Information.nRCGI.nRCellIdentity.size *
+ sizeof(U8));
+ }
+ DU_FREE(srvCellItem->served_Cell_Information.nRCGI.pLMN_Identity.buf,\
+ srvCellItem->served_Cell_Information.nRCGI.pLMN_Identity.size *
+ sizeof(U8));
+ }
+ DU_FREE(duServedCell->list.array[plmnidx],sizeof(GNB_DU_Served_Cells_ItemIEs_t));
+ }
+ DU_FREE(duServedCell->list.array,plmnCnt*sizeof(GNB_DU_Served_Cells_ItemIEs_t*));
+ }
+}