From 0740154bff084f1117edd84a0bdfc82b068f5db0 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Tue, 20 Oct 2020 17:29:25 +0200 Subject: [PATCH] rrc,sync: fix two uninit vars detected by Valgrind when running UE with TDD cell --- lib/src/phy/sync/sync.c | 2 +- srsue/src/stack/rrc/rrc.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/phy/sync/sync.c b/lib/src/phy/sync/sync.c index e9c04b27c..e4f1946e7 100644 --- a/lib/src/phy/sync/sync.c +++ b/lib/src/phy/sync/sync.c @@ -745,7 +745,7 @@ srslte_sync_find(srslte_sync_t* q, const cf_t* input, uint32_t find_offset, uint int sss_idx; uint32_t nof_frame_type_trials; srslte_frame_type_t frame_type_trials[2]; - float sss_corr[2]; + float sss_corr[2] = {}; uint32_t sf_idx[2], N_id_1[2]; if (q->detect_frame_type) { diff --git a/srsue/src/stack/rrc/rrc.cc b/srsue/src/stack/rrc/rrc.cc index 0cbad1b6f..40c7c3b01 100644 --- a/srsue/src/stack/rrc/rrc.cc +++ b/srsue/src/stack/rrc/rrc.cc @@ -1185,7 +1185,7 @@ void rrc::handle_sib1() // Set TDD Config if (sib1->tdd_cfg_present) { - srslte_tdd_config_t tdd_config; + srslte_tdd_config_t tdd_config = {}; tdd_config.sf_config = sib1->tdd_cfg.sf_assign.to_number(); tdd_config.ss_config = sib1->tdd_cfg.special_sf_patterns.to_number(); phy->set_config_tdd(tdd_config);