[ JIRA Id - ODUHIGH-573 ] Code changes upgraded to Gcc version 11.4.0
[o-du/l2.git] / src / 5gnrsch / sch.c
index 8279bf6..40a745c 100644 (file)
@@ -50,6 +50,7 @@
 #include "sch_utils.h"
 #include "sch_fcfs.h"
 #include "sch_slice_based.h"
+SchCb schCb[SCH_MAX_INST];
 
 /**
  * @brief Scheduler All Apis initialized. 
@@ -886,6 +887,7 @@ uint8_t SchSendCellDeleteRspToMac(SchCellDeleteReq  *ueDelete, Inst inst, SchMac
 void deleteSchCellCb(SchCellCb *cellCb)
 {
    uint8_t sliceIdx=0, slotIdx=0, plmnIdx = 0;
+   uint8_t ueIdx = 0;
    CmLListCp *list=NULL;
    CmLList *node=NULL, *next=NULL;
    SchPageInfo *tempNode = NULLP;
@@ -903,6 +905,12 @@ void deleteSchCellCb(SchCellCb *cellCb)
             deleteNodeFromLList(list, node);
             node = next;
          }
+         for(ueIdx = 0; ueIdx< MAX_NUM_UE; ueIdx++)
+         {
+            SCH_FREE(cellCb->schDlSlotInfo[slotIdx]->rarAlloc[ueIdx], sizeof(RarAlloc));
+            SCH_FREE(cellCb->schDlSlotInfo[slotIdx]->dlMsgAlloc[ueIdx], sizeof(DlMsgSchInfo));
+         }
+         SCH_FREE(cellCb->schDlSlotInfo[slotIdx]->ulGrant, sizeof(DciInfo));
          SCH_FREE(cellCb->schDlSlotInfo[slotIdx], sizeof(SchDlSlotInfo));
       }
       SCH_FREE(cellCb->schDlSlotInfo, cellCb->numSlots *sizeof(SchDlSlotInfo*));
@@ -921,6 +929,10 @@ void deleteSchCellCb(SchCellCb *cellCb)
             deleteNodeFromLList(list, node);
             node = next;
          }
+         for(ueIdx = 0; ueIdx< MAX_NUM_UE; ueIdx++)
+         {
+            SCH_FREE(cellCb->schUlSlotInfo[slotIdx]->schPuschInfo[ueIdx], sizeof(SchPuschInfo));
+         }
          SCH_FREE(cellCb->schUlSlotInfo[slotIdx], sizeof(SchUlSlotInfo));  
       }
       SCH_FREE(cellCb->schUlSlotInfo,  cellCb->numSlots * sizeof(SchUlSlotInfo*));