- 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(uint8_t));
- }
- 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(uint8_t));
- }
- 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(uint8_t));
- }
- DU_FREE(srvCellItem->served_Cell_Information.nRCGI.pLMN_Identity.buf,\
- srvCellItem->served_Cell_Information.nRCGI.pLMN_Identity.size *
- sizeof(uint8_t));
- }
- DU_FREE(duServedCell->list.array[plmnidx],sizeof(GNB_DU_Served_Cells_ItemIEs_t));
+ srvCellItem= &duServedCell->list.array[0]->value.choice.GNB_DU_Served_Cells_Item;
+
+ DU_FREE(srvCellItem->served_Cell_Information.nRCGI.pLMN_Identity.buf,\
+ srvCellItem->served_Cell_Information.nRCGI.pLMN_Identity.size * sizeof(uint8_t));
+ DU_FREE(srvCellItem->served_Cell_Information.nRCGI.nRCellIdentity.buf,\
+ srvCellItem->served_Cell_Information.nRCGI.nRCellIdentity.size * sizeof(uint8_t));
+
+ if(srvCellItem->served_Cell_Information.fiveGS_TAC!=NULLP)
+ {
+ 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));
+ }
+
+ if(srvCellItem->served_Cell_Information.servedPLMNs.list.array!=NULLP)
+ {
+ if(srvCellItem->served_Cell_Information.servedPLMNs.list.array[plmnIdx] != NULLP)
+ {
+ servedPlmnItem = srvCellItem->served_Cell_Information.servedPLMNs.list.array[plmnIdx];
+ DU_FREE(servedPlmnItem->pLMN_Identity.buf, servedPlmnItem->pLMN_Identity.size * sizeof(uint8_t));
+
+ if(servedPlmnItem->iE_Extensions != NULLP)
+ {
+ if(servedPlmnItem->iE_Extensions->list.array != NULLP)
+ {
+ if(servedPlmnItem->iE_Extensions->list.array[0] != NULLP)
+ {
+ if(servedPlmnItem->iE_Extensions->list.array[0]->extensionValue.choice.SliceSupportList.list.\
+ array != NULLP)
+ {
+ if(servedPlmnItem->iE_Extensions->list.array[0]->extensionValue.choice.SliceSupportList.list.\
+ array[sliceId] != NULLP)
+ {
+ sliceSupportItem = servedPlmnItem->iE_Extensions->list.array[0]->extensionValue.choice.\
+ SliceSupportList.list.array[sliceId];
+
+ DU_FREE(sliceSupportItem->sNSSAI.sST.buf, sizeof(uint8_t));
+
+ if(sliceSupportItem->sNSSAI.sD != NULLP)
+ {
+ DU_FREE(sliceSupportItem->sNSSAI.sD->buf, sliceSupportItem->sNSSAI.sD->size);
+ DU_FREE(sliceSupportItem->sNSSAI.sD, sizeof(OCTET_STRING_t));
+ }
+
+ DU_FREE(servedPlmnItem->iE_Extensions->list.array[0]->extensionValue.choice.SliceSupportList.\
+ list.array[sliceId], sizeof(SliceSupportItem_t));
+ }
+ DU_FREE(servedPlmnItem->iE_Extensions->list.array[0]->extensionValue.choice.SliceSupportList.\
+ list.array, sizeof(SliceSupportItem_t*));
+ }
+ DU_FREE(servedPlmnItem->iE_Extensions->list.array[0], sizeof(ServedPLMNs_ItemExtIEs_t));
+ }
+ DU_FREE(servedPlmnItem->iE_Extensions->list.array, extensionCnt*sizeof(ServedPLMNs_ItemExtIEs_t*));
+ }
+ DU_FREE(servedPlmnItem->iE_Extensions, sizeof(ProtocolExtensionContainer_4624P3_t));
+ }
+ 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 *));
+ }
+
+ 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)
+ {
+ 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*));
+ }
+
+ if(srvCellItem->served_Cell_Information.nR_Mode_Info.choice.fDD->dL_NRFreqInfo.\
+ freqBandListNr.list.array)
+ {
+ 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, sizeof(FDD_Info_t));
+ }
+
+ DU_FREE(srvCellItem->served_Cell_Information.measurementTimingConfiguration.buf,\
+ srvCellItem->served_Cell_Information.measurementTimingConfiguration.size);
+
+ if(srvCellItem->gNB_DU_System_Information != NULLP)
+ {
+ if(srvCellItem->gNB_DU_System_Information->mIB_message.buf != NULLP)
+ {
+ DU_FREE(srvCellItem->gNB_DU_System_Information->mIB_message.buf,\
+ srvCellItem->gNB_DU_System_Information->mIB_message.size);
+ }
+
+ 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(srvCellItem->gNB_DU_System_Information, sizeof(GNB_DU_System_Information_t));
+ }
+
+ DU_FREE(duServedCell->list.array[0], sizeof(GNB_DU_Served_Cells_ItemIEs_t));