From fd4eb44bfcf4dfcd4b0904cc7eeb56bc19bf8bfb Mon Sep 17 00:00:00 2001 From: Agmagor Date: Wed, 16 Nov 2016 16:46:22 +0100 Subject: [PATCH 1/2] memleak: free cellsearch buffer after scan --- srslte/examples/cell_search.c | 1 + 1 file changed, 1 insertion(+) diff --git a/srslte/examples/cell_search.c b/srslte/examples/cell_search.c index fb4933ebd..02c3d8ada 100644 --- a/srslte/examples/cell_search.c +++ b/srslte/examples/cell_search.c @@ -218,6 +218,7 @@ int main(int argc, char **argv) { srslte_rf_start_rx_stream(&rf); n = srslte_ue_cellsearch_scan(&cs, found_cells, NULL); + srslte_ue_cellsearch_free(&cs); if (n < 0) { fprintf(stderr, "Error searching cell\n"); exit(-1); From 388eb35e6703153c56d96cdbf52c103e8e1dd701 Mon Sep 17 00:00:00 2001 From: Agmagor Date: Thu, 17 Nov 2016 17:14:08 +0100 Subject: [PATCH 2/2] memleak: free FFT plan upon pss_synch_free --- srslte/lib/sync/pss.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/srslte/lib/sync/pss.c b/srslte/lib/sync/pss.c index 46c02414e..647baa838 100644 --- a/srslte/lib/sync/pss.c +++ b/srslte/lib/sync/pss.c @@ -202,6 +202,8 @@ void srslte_pss_synch_free(srslte_pss_synch_t *q) { if (q->conv_output_avg) { free(q->conv_output_avg); } + + srslte_dft_plan_free(&q->dftp_input); bzero(q, sizeof(srslte_pss_synch_t)); }