From: lal.harshita Date: Mon, 31 May 2021 10:45:58 +0000 (+0530) Subject: Memory handling fixes [Issue-ID: ODUHIGH-337] X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=efd3fd582205e5c94878e6bcae6d6282dd6f1d25;p=o-du%2Fl2.git Memory handling fixes [Issue-ID: ODUHIGH-337] Change-Id: Ib8620401c808b3cf2307e0d3b401c80fa7a016f6 Signed-off-by: lal.harshita --- diff --git a/src/cm/du_app_rlc_inf.c b/src/cm/du_app_rlc_inf.c index 9d98a314b..22bcaf95c 100644 --- a/src/cm/du_app_rlc_inf.c +++ b/src/cm/du_app_rlc_inf.c @@ -650,18 +650,11 @@ uint8_t unpackRlcUlUserDataToDu(RlcUlUserDataToDuFunc func, Pst *pst, Buffer *mB * ****************************************************************/ uint8_t packRlcDlUserDataToRlc(Pst *pst, RlcDlUserDataInfo *dlUserData) { - Buffer *mBuf = NULLP; - if(pst->selector == ODU_SELECTOR_LWLC) { - if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) - { - DU_LOG("\nERROR --> RLC DL: Memory allocation failed at packRlcDlUserDataToRlc"); - return RFAILED; - } /* pack the address of the structure */ - CMCHKPK(oduPackPointer,(PTR)dlUserData, mBuf); - return ODU_POST_TASK(pst,mBuf); + CMCHKPK(oduPackPointer,(PTR)dlUserData, dlUserData->dlMsg); + return ODU_POST_TASK(pst,dlUserData->dlMsg); } else { @@ -693,7 +686,6 @@ uint8_t unpackRlcDlUserDataToRlc(DuRlcDlUserDataToRlcFunc func, Pst *pst, Buffer RlcDlUserDataInfo *dlUserData; /* unpack the address of the structure */ CMCHKUNPK(oduUnpackPointer, (PTR *)&dlUserData, mBuf); - ODU_PUT_MSG_BUF(mBuf); return (*func)(pst, dlUserData); } else diff --git a/src/du_app/du_ue_mgr.c b/src/du_app/du_ue_mgr.c index 920afca36..3a733dfd0 100644 --- a/src/du_app/du_ue_mgr.c +++ b/src/du_app/du_ue_mgr.c @@ -177,12 +177,6 @@ uint8_t duBuildAndSendDlUserDataToRlc(uint16_t msgLen, EgtpMsg *egtpMsg) return RFAILED; } memset(dlDataMsgInfo, 0, sizeof(RlcDlUserDataInfo)); - if(ODU_GET_MSG_BUF(DU_APP_MEM_REGION, DU_POOL, &dlDataMsgInfo->dlMsg) != ROK) - { - DU_LOG("\nERROR --> DU_APP : Memory allocation failed for dlMsg in duHdlEgtpDlData()"); - DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, dlDataMsgInfo, sizeof(RlcDlUserDataInfo)); - return RFAILED; - } dlDataMsgInfo->dlMsg = egtpMsg->msg; dlDataMsgInfo->msgLen = msgLen;