From fb0d2714c6da30d38c7edb785279709152056f14 Mon Sep 17 00:00:00 2001 From: Jaroslava Fiedlerova Date: Fri, 28 Jun 2024 11:10:13 +0200 Subject: [PATCH] Replace dynamic mem allocation by static for p_outDec in decode_offload --- openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c b/openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c index ffd3797aa2..d2475d2e08 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c +++ b/openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c @@ -258,7 +258,8 @@ int decode_offload(PHY_VARS_gNB *phy_vars_gNB, offset += LDPC_MAX_CB_SIZE; } - int8_t *p_outDec = calloc(harq_process->C * Kr_bytes, sizeof(int8_t)); + int8_t p_outDec[harq_process->C * Kr_bytes]; + memset(p_outDec, 0, sizeof(p_outDec)); decodeIterations = ldpc_interface_offload.LDPCdecoder(decParams, harq_pid, ULSCH_id, harq_process->C, (int8_t *)l_ol, p_outDec, NULL, NULL); @@ -307,7 +308,6 @@ int decode_offload(PHY_VARS_gNB *phy_vars_gNB, } ulsch->last_iteration_cnt = decodeIterations; - free(p_outDec); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_gNB_ULSCH_DECODING,0); return 0; }