[Epic-ID: ODUHIGH-475][Task-ID: ODUHIGH-476]Fix for segmentation fault in RACH Indica...
[o-du/l2.git] / src / du_app / du_sys_info_hdl.c
index 6644079..debaf53 100644 (file)
@@ -333,7 +333,6 @@ uint8_t BuildMibMsg()
 uint8_t BuildCellIdentity(CellIdentity_t  *cellIdentity)
 {
    cellIdentity->size = ODU_VALUE_FIVE*sizeof(uint8_t);
-   cellIdentity->bits_unused = ODU_VALUE_FOUR;
 
    DU_ALLOC(cellIdentity->buf, cellIdentity->size);
    if(!cellIdentity->buf)
@@ -341,8 +340,7 @@ uint8_t BuildCellIdentity(CellIdentity_t  *cellIdentity)
       DU_LOG("\nERROR  -->  DU APP: CellIdentity memory allocation failure");
       return RFAILED;
    }
-   memset(cellIdentity->buf, 0,  cellIdentity->size);
-   cellIdentity->buf[4] = duCfgParam.sib1Params.cellIdentity;
+   fillBitString(cellIdentity, ODU_VALUE_FOUR, ODU_VALUE_FIVE, duCfgParam.sib1Params.cellIdentity); 
 
    return ROK;
 }
@@ -2865,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 */