Fix for segmentation fault in CLA [Issue-ID: ODUHIGH-348] 68/6468/1
authorlal.harshita <Harshita.Lal@radisys.com>
Mon, 5 Jul 2021 16:49:54 +0000 (22:19 +0530)
committerlal.harshita <Harshita.Lal@radisys.com>
Mon, 5 Jul 2021 16:50:00 +0000 (22:20 +0530)
Change-Id: I271a5f5e2631c72492e109c1e77841ea8aa53ad1
Signed-off-by: lal.harshita <Harshita.Lal@radisys.com>
src/5gnrmac/mac_cfg_hdl.c
src/5gnrmac/mac_demux.c
src/5gnrsch/sch_slot_ind.c
src/du_app/du_cell_mgr.c
src/du_app/du_f1ap_msg_hdl.c
src/du_app/du_ue_mgr.c

index 685b923..b2244cb 100644 (file)
@@ -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;
index ae40827..e3287f6 100644 (file)
@@ -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));
               }
 
index 92a17d7..6d8b7da 100644 (file)
@@ -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;
    }
 
index 6c4b888..6c28f46 100644 (file)
@@ -242,6 +242,7 @@ uint8_t DuProcMacCellDeleteRsp(Pst *pst, MacCellDeleteRsp *deleteRsp)
             duCb.numActvCells--;
             duCb.numCfgCells--;
             DU_FREE(duCb.actvCellLst[cellIdx], sizeof(DuCellCb));
+
          }
          else
          {
index 8c776c4..5fde3ad 100644 (file)
@@ -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,\
index 7780439..4eb2a67 100644 (file)
@@ -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);