From: lal.harshita Date: Wed, 26 Oct 2022 06:26:54 +0000 (+0530) Subject: [Epic-ID: ODUHIGH-475][Task-ID: ODUHIGH-476]Fix for segmentation fault in RACH Indica... X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?p=o-du%2Fl2.git;a=commitdiff_plain;h=069cd58d7261040a1b93a1d35ba2e0d7ec6a288d [Epic-ID: ODUHIGH-475][Task-ID: ODUHIGH-476]Fix for segmentation fault in RACH Indication in HO Signed-off-by: lal.harshita Change-Id: Ia1b9f13f0d1b15ee17bbc59f4854dd01f8f542b4 --- diff --git a/src/5gnrsch/sch_rach.c b/src/5gnrsch/sch_rach.c index 162ed15f6..8a81745fd 100644 --- a/src/5gnrsch/sch_rach.c +++ b/src/5gnrsch/sch_rach.c @@ -375,10 +375,8 @@ uint16_t calculateRaRnti(uint8_t symbolIdx, uint8_t slotIdx, uint8_t freqIdx) * @param[in] shed instance * @return void **/ -void createSchRaCb(SchRaReq *raReq, Inst schInst) +void createSchRaCb(uint8_t ueId, SchRaReq *raReq, Inst schInst) { - uint8_t ueId = 0; - if(raReq->isCFRA) { /* If a UE in handover has triggered CFRA, its UE CB context is already present in SCH, @@ -760,7 +758,7 @@ bool schProcessRaReq(Inst schInst, SchCellCb *cell, SlotTimingInfo currTime, uin cell->schUlSlotInfo[msg3Time.slot]->puschUe = ueId; /* Create raCb at SCH */ - createSchRaCb(cell->raReq[ueId-1], schInst); + createSchRaCb(ueId, cell->raReq[ueId-1], schInst); /* Remove RachInd from pending RA request list */ SCH_FREE(cell->raReq[ueId-1]->rachInd, sizeof(RachIndInfo)); diff --git a/src/du_app/du_sys_info_hdl.c b/src/du_app/du_sys_info_hdl.c index a53e16215..debaf5334 100644 --- a/src/du_app/du_sys_info_hdl.c +++ b/src/du_app/du_sys_info_hdl.c @@ -2863,7 +2863,7 @@ void FreePuschCfgCommon(struct BWP_UplinkCommon__pusch_ConfigCommon *puschCfg) /* P0 Nominal with grant */ DU_FREE(setup->p0_NominalWithGrant, sizeof(long)); - DU_ALLOC(puschCfg->choice.setup, sizeof(PUSCH_ConfigCommon_t)); + DU_FREE(puschCfg->choice.setup, sizeof(PUSCH_ConfigCommon_t)); } }/* BuildPuschCfgCommon */ diff --git a/src/du_app/du_ue_mgr.c b/src/du_app/du_ue_mgr.c index 7900c625b..b77b231a8 100644 --- a/src/du_app/du_ue_mgr.c +++ b/src/du_app/du_ue_mgr.c @@ -1279,6 +1279,7 @@ uint8_t fillMacUeCfg(uint16_t cellId, uint8_t gnbDuUef1apId, uint16_t crnti, DuU fillDefaultPhyCellGrpInfo(macUeCfg); fillDefaultSpCellGrpInfo(macUeCfg); fillDefaultModulation(macUeCfg); + macUeCfg->ambrCfg = NULLP; } #ifdef NR_DRX