From: lal.harshita Date: Mon, 5 Jul 2021 16:49:54 +0000 (+0530) Subject: Fix for segmentation fault in CLA [Issue-ID: ODUHIGH-348] X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=377a2d180b617d4df038e1780d4a8de98d7c125f;p=o-du%2Fl2.git Fix for segmentation fault in CLA [Issue-ID: ODUHIGH-348] Change-Id: I271a5f5e2631c72492e109c1e77841ea8aa53ad1 Signed-off-by: lal.harshita --- diff --git a/src/5gnrmac/mac_cfg_hdl.c b/src/5gnrmac/mac_cfg_hdl.c index 685b923ee..b2244cb98 100644 --- a/src/5gnrmac/mac_cfg_hdl.c +++ b/src/5gnrmac/mac_cfg_hdl.c @@ -177,12 +177,6 @@ uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg) } else { - if(macCellCfg->prachCfg.fdm[0].numUnusedRootSeq != 0) - { - MAC_FREE_SHRABL_BUF(pst->region, pst->pool, macCellCfg->prachCfg.fdm[0].unsuedRootSeq, - macCellCfg->prachCfg.fdm[0].numUnusedRootSeq* sizeof(uint8_t)); - } - MAC_FREE_SHRABL_BUF(pst->region, pst->pool, macCellCfg->sib1Cfg.sib1Pdu, macCellCfg->sib1Cfg.sib1PduLen); MAC_FREE_SHRABL_BUF(pst->region, pst->pool, macCellCfg ,sizeof(MacCellCfg)); } return ret; diff --git a/src/5gnrmac/mac_demux.c b/src/5gnrmac/mac_demux.c index ae4082797..e3287f6b6 100644 --- a/src/5gnrmac/mac_demux.c +++ b/src/5gnrmac/mac_demux.c @@ -132,9 +132,9 @@ uint8_t unpackRxData(uint16_t cellId, SlotIndInfo slotInfo, RxDataIndPdu *rxData if(macCb.macCell[cellIdx]->macRaCb[ueIdx].crnti == rxDataIndPdu->rnti) { MAC_FREE(macCb.macCell[cellIdx]->macRaCb[ueIdx].msg4Pdu, \ - macCb.macCell[cellIdx]->macRaCb[ueIdx].msg4PduLen); - MAC_FREE(macCb.macCell[cellIdx]->macRaCb[ueIdx].msg4TxPdu, \ - macCb.macCell[cellIdx]->macRaCb[ueIdx].msg4TbSize); + macCb.macCell[cellIdx]->macRaCb[ueIdx].msg4PduLen); + MAC_FREE(macCb.macCell[cellIdx]->macRaCb[ueIdx].msg4TxPdu, \ + macCb.macCell[cellIdx]->macRaCb[ueIdx].msg4TbSize - TX_PAYLOAD_HDR_LEN); memset(&macCb.macCell[cellIdx]->macRaCb[ueIdx], 0, sizeof(MacRaCbInfo)); } diff --git a/src/5gnrsch/sch_slot_ind.c b/src/5gnrsch/sch_slot_ind.c index 92a17d733..6d8b7daa2 100644 --- a/src/5gnrsch/sch_slot_ind.c +++ b/src/5gnrsch/sch_slot_ind.c @@ -330,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; } diff --git a/src/du_app/du_cell_mgr.c b/src/du_app/du_cell_mgr.c index 6c4b88802..6c28f460c 100644 --- a/src/du_app/du_cell_mgr.c +++ b/src/du_app/du_cell_mgr.c @@ -242,6 +242,7 @@ uint8_t DuProcMacCellDeleteRsp(Pst *pst, MacCellDeleteRsp *deleteRsp) duCb.numActvCells--; duCb.numCfgCells--; DU_FREE(duCb.actvCellLst[cellIdx], sizeof(DuCellCb)); + } else { diff --git a/src/du_app/du_f1ap_msg_hdl.c b/src/du_app/du_f1ap_msg_hdl.c index 8c776c445..5fde3ade5 100644 --- a/src/du_app/du_f1ap_msg_hdl.c +++ b/src/du_app/du_f1ap_msg_hdl.c @@ -7085,10 +7085,10 @@ void freeF1UeDb(F1UeContextSetupDb *f1UeDb) { if(f1UeDb->dlRrcMsg->rrcMsgPdu) { - DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL,\ - f1UeDb->dlRrcMsg->rrcMsgPdu, f1UeDb->dlRrcMsg->rrcMsgSize); + //DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL,\ + f1UeDb->dlRrcMsg->rrcMsgPdu, f1UeDb->dlRrcMsg->rrcMsgSize); } - memset(f1UeDb->dlRrcMsg, 0, sizeof(F1DlRrcMsg)); + DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, f1UeDb->dlRrcMsg, sizeof(F1DlRrcMsg)); } freeDuUeCfg(&f1UeDb->duUeCfg); memset(f1UeDb, 0, sizeof(F1UeContextSetupDb)); @@ -12053,7 +12053,7 @@ uint8_t procF1DlRrcMsgTrans(F1AP_PDU_t *f1apMsg) if(f1DlRrcMsg->protocolIEs.list.array[idx]->value.choice.RRCContainer.size > 0) { dlMsg.rrcMsgSize = f1DlRrcMsg->protocolIEs.list.array[idx]->value.choice.RRCContainer.size; - DU_ALLOC(dlMsg.rrcMsgPdu, dlMsg.rrcMsgSize); + DU_ALLOC_SHRABL_BUF(dlMsg.rrcMsgPdu, dlMsg.rrcMsgSize); if(dlMsg.rrcMsgPdu) { memcpy(dlMsg.rrcMsgPdu, f1DlRrcMsg->protocolIEs.list.array[idx]->value.choice.RRCContainer.buf,\ diff --git a/src/du_app/du_ue_mgr.c b/src/du_app/du_ue_mgr.c index 7780439f9..4eb2a6759 100644 --- a/src/du_app/du_ue_mgr.c +++ b/src/du_app/du_ue_mgr.c @@ -280,7 +280,7 @@ uint8_t duBuildAndSendDlCcchInd(uint16_t *cellId, uint16_t *crnti, \ { dlCcchIndInfo->dlCcchMsg[idx2] = dlCcchMsg[idx2]; } - DU_FREE(dlCcchMsg, dlCcchMsgSize); + DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, dlCcchMsg, dlCcchMsgSize); /* Fill Pst */ FILL_PST_DUAPP_TO_MAC(pst, EVENT_MAC_DL_CCCH_IND);