diff --git a/lib/src/phy/phch/test/pssch_pscch_file_test.c b/lib/src/phy/phch/test/pssch_pscch_file_test.c index ecc6e161d..69f252e24 100644 --- a/lib/src/phy/phch/test/pssch_pscch_file_test.c +++ b/lib/src/phy/phch/test/pssch_pscch_file_test.c @@ -144,18 +144,21 @@ int base_init() ERROR("Error allocating memory\n"); return SRSLTE_ERROR; } + srslte_vec_cf_zero(sf_buffer, sf_n_re); equalized_sf_buffer = srslte_vec_cf_malloc(sf_n_re); if (!equalized_sf_buffer) { ERROR("Error allocating memory\n"); return SRSLTE_ERROR; } + srslte_vec_cf_zero(equalized_sf_buffer, sf_n_re); input_buffer = srslte_vec_cf_malloc(sf_n_samples); if (!input_buffer) { ERROR("Error allocating memory\n"); return SRSLTE_ERROR; } + srslte_vec_cf_zero(input_buffer, sf_n_samples); srslte_sci_init(&sci, cell, sl_comm_resource_pool); diff --git a/lib/src/phy/phch/test/pssch_test.c b/lib/src/phy/phch/test/pssch_test.c index 3027a87c0..8300ad3b3 100644 --- a/lib/src/phy/phch/test/pssch_test.c +++ b/lib/src/phy/phch/test/pssch_test.c @@ -109,6 +109,11 @@ int main(int argc, char** argv) uint32_t N_x_id = 255; uint32_t sf_n_re = SRSLTE_SF_LEN_RE(cell.nof_prb, cell.cp); cf_t* sf_buffer = srslte_vec_cf_malloc(sf_n_re); + if (!sf_buffer) { + ERROR("Error allocating memory\n"); + return SRSLTE_ERROR; + } + srslte_vec_cf_zero(sf_buffer, sf_n_re); // Transport block buffer uint8_t tb[SRSLTE_SL_SCH_MAX_TB_LEN] = {};