From cbda94f0a6b9395084946db9ba5ea07e4917ebf2 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Thu, 8 Mar 2018 17:58:11 +0100 Subject: [PATCH] fix mem leak in phch_recv --- srsue/hdr/phy/phch_recv.h | 2 ++ srsue/src/phy/phch_recv.cc | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/srsue/hdr/phy/phch_recv.h b/srsue/hdr/phy/phch_recv.h index d77e489ae..7a04e4b10 100644 --- a/srsue/hdr/phy/phch_recv.h +++ b/srsue/hdr/phy/phch_recv.h @@ -199,6 +199,7 @@ private: uint32_t offset; } cell_info_t; void init(srslte::log *log_h, bool sic_pss_enabled, uint32_t max_sf_window); + void deinit(); void reset(); int find_cells(cf_t *input_buffer, float rx_gain_offset, srslte_cell_t current_cell, uint32_t nof_sf, cell_info_t found_cells[MAX_CELLS]); private: @@ -220,6 +221,7 @@ private: // Class to perform intra-frequency measurements class intra_measure : public thread { public: + ~intra_measure(); void init(phch_common *common, rrc_interface_phy *rrc, srslte::log *log_h); void stop(); void add_cell(int pci); diff --git a/srsue/src/phy/phch_recv.cc b/srsue/src/phy/phch_recv.cc index 7d6a2eec6..a96b9c545 100644 --- a/srsue/src/phy/phch_recv.cc +++ b/srsue/src/phy/phch_recv.cc @@ -711,6 +711,12 @@ void phch_recv::run_thread() mac->tti_clock(tti); tti = (tti+1) % 10240; } + + for (int i=0;icurrent_earfcn = earfcn; current_sflen = SRSLTE_SF_LEN_PRB(cell.nof_prb);