X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2F5gnrsch%2Fsch.c;h=40a745c6b1fc7c8b19ccdcc093ac5a2a7e42c2a3;hb=2a310f38af13dafd243ef7b24d5a721ed34355b3;hp=8279bf6c6ac158b655b88159427ba9117dee0382;hpb=3b1e7ce233103b83ac87359bbec15c275d4a11de;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch.c b/src/5gnrsch/sch.c index 8279bf6c6..40a745c6b 100644 --- a/src/5gnrsch/sch.c +++ b/src/5gnrsch/sch.c @@ -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*));