From c327a18f59d8b9db430af3b95cc4225d9b8cf576 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Tue, 25 Aug 2020 17:51:52 +0200 Subject: [PATCH] radio: fix memleak of dummy buffers --- lib/src/radio/radio.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/src/radio/radio.cc b/lib/src/radio/radio.cc index c663c794f..fcd915ff7 100644 --- a/lib/src/radio/radio.cc +++ b/lib/src/radio/radio.cc @@ -54,6 +54,12 @@ radio::~radio() zeros = nullptr; } + for (uint32_t i = 0; i < SRSLTE_MAX_CHANNELS; i++) { + if (dummy_buffers[i]) { + free(dummy_buffers[i]); + } + } + for (srslte_resampler_fft_t& q : interpolators) { srslte_resampler_fft_free(&q); }