Fixes minor unitialised/leaked memory

master
Xavier Arteaga 5 years ago committed by Xavier Arteaga
parent 703bbb44a3
commit 78fcc11a30

@ -138,11 +138,15 @@ void srslte_softbuffer_rx_reset_cb(srslte_softbuffer_rx_t *q, uint32_t nof_cb) {
if (q->buffer_f[i]) {
bzero(q->buffer_f[i], SOFTBUFFER_SIZE*sizeof(int16_t));
}
if (q->data[i]) {
bzero(q->data[i], sizeof(uint8_t) * 6144 / 8);
}
}
}
if (q->cb_crc) {
bzero(q->cb_crc, sizeof(bool) * q->max_cb);
}
q->tb_crc = false;
}

@ -105,7 +105,7 @@ private:
srslte_ul_sf_cfg_t sf_cfg_ul;
uint32_t cc_idx;
bool pregen_enabled;
bool pregen_enabled = false;
bool cell_initiated;
cf_t* signal_buffer_rx[SRSLTE_MAX_PORTS];
cf_t* signal_buffer_tx[SRSLTE_MAX_PORTS];

@ -88,10 +88,10 @@ public:
scell_cfg_t scell_cfg[SRSLTE_MAX_CARRIERS];
// Save last TBS for uplink (mcs >= 28)
srslte_ra_tb_t last_ul_tb[SRSLTE_MAX_HARQ_PROC][SRSLTE_MAX_CARRIERS];
srslte_ra_tb_t last_ul_tb[SRSLTE_MAX_HARQ_PROC][SRSLTE_MAX_CARRIERS] = {};
// Save last TBS for DL (Format1C)
int last_dl_tbs[SRSLTE_MAX_HARQ_PROC][SRSLTE_MAX_CARRIERS][SRSLTE_MAX_CODEWORDS];
int last_dl_tbs[SRSLTE_MAX_HARQ_PROC][SRSLTE_MAX_CARRIERS][SRSLTE_MAX_CODEWORDS] = {};
phy_common(uint32_t max_workers);

@ -117,7 +117,6 @@ cc_worker::cc_worker(uint32_t cc_idx, uint32_t max_prb, srsue::phy_common* phy,
ue_dl.pdsch.llr_is_8bit = true;
ue_dl.pdsch.dl_sch.llr_is_8bit = true;
}
pregen_enabled = false;
}
cc_worker::~cc_worker()

@ -44,6 +44,9 @@ ue::ue() : logger(nullptr)
// load FFTW wisdom
srslte_dft_load();
// save FFTW wisdom when UE exits
atexit(srslte_dft_exit);
pool = byte_buffer_pool::get_instance();
}
@ -53,8 +56,6 @@ ue::~ue()
stack.reset();
byte_buffer_pool::cleanup();
// save FFTW wisdom
srslte_dft_exit();
}
int ue::init(const all_args_t& args_, srslte::logger* logger_)

Loading…
Cancel
Save