+
+ macCb.macCell[cellIdx]->macCellCfg.numSupportedSlice = macCellCfg->numSupportedSlice;
+ MAC_ALLOC(macCb.macCell[cellIdx]->macCellCfg.snssai, macCb.macCell[cellIdx]->macCellCfg.numSupportedSlice\
+ * sizeof(Snssai*));
+ if(macCb.macCell[cellIdx]->macCellCfg.snssai == NULLP)
+ {
+ DU_LOG("\nERROR --> MAC: Memory allocation failed at MacProcCellCfgReq");
+ return RFAILED;
+ }
+
+ if(macCb.macCell[cellIdx]->macCellCfg.snssai)
+ {
+ for(sliceIdx=0; sliceIdx<macCb.macCell[cellIdx]->macCellCfg.numSupportedSlice; sliceIdx++)
+ {
+ if(macCellCfg->snssai[sliceIdx])
+ {
+ MAC_ALLOC(macCb.macCell[cellIdx]->macCellCfg.snssai[sliceIdx], sizeof(Snssai));
+ if(!macCb.macCell[cellIdx]->macCellCfg.snssai[sliceIdx])
+ {
+ DU_LOG("\nERROR --> MAC: Memory allocation failed at MacProcCellCfgReq");
+ return RFAILED;
+ }
+ memcpy(macCb.macCell[cellIdx]->macCellCfg.snssai[sliceIdx], macCellCfg->snssai[sliceIdx], sizeof(Snssai));
+ }
+ }
+ }