Fix for segmentation fault in CLA [Issue-ID: ODUHIGH-348]
[o-du/l2.git] / src / 5gnrsch / sch_slot_ind.c
index 4267906..6d8b7da 100644 (file)
@@ -241,6 +241,11 @@ uint8_t schProcessSlotInd(SlotIndInfo *slotInd, Inst schInst)
    dlBrdcstAlloc->sib1Trans = NO_SIB1;
 
    cell = schCb[schInst].cells[schInst];
+   if(cell == NULLP)
+   {
+      DU_LOG("\nERROR  -->  SCH : Cell Does not exist");
+      return RFAILED;
+   }
    ssb_rep = cell->cellCfg.ssbSchCfg.ssbPeriod;
    memcpy(&cell->slotInfo, slotInd, sizeof(SlotIndInfo));
    dlBrdcstAlloc->ssbIdxSupported = 1;
@@ -325,7 +330,7 @@ uint8_t schProcessSlotInd(SlotIndInfo *slotInd, Inst schInst)
        dlBrdcstAlloc->ssbTrans,
        dlBrdcstAlloc->sib1Trans);
 
-      SCH_FREE(cell->schDlSlotInfo[slot]->rarInfo,sizeof(RarAlloc));
+      SCH_FREE(cell->schDlSlotInfo[slot]->rarInfo,sizeof(RarInfo));
       cell->schDlSlotInfo[slot]->rarInfo = NULLP;
    }