From 54a98b5b52fa2b2117a374f186173547dd0b8027 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Fri, 15 Jan 2021 16:35:04 +0100 Subject: [PATCH] ChannelizerBase: Fix memory leak The memory leak was reported by ASan: Direct leak of 32 byte(s) in 1 object(s) allocated from: #0 0x7f23b488e459 in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:145 #1 0x558e83e39e3c in ChannelizerBase::initFilters() /osmo-trx/Transceiver52M/ChannelizerBase.cpp:84 #2 0x558e83e3a8a0 in ChannelizerBase::init() /osmo-trx/Transceiver52M/ChannelizerBase.cpp:188 #3 0x558e83e2d263 in RadioInterfaceMulti::init(int) /osmo-trx/Transceiver52M/radioInterfaceMulti.cpp:197 #4 0x558e83de76d2 in makeRadioInterface(trx_ctx*, RadioDevice*, int) /osmo-trx/Transceiver52M/osmo-trx.cpp:115 #5 0x558e83dea663 in trx_start /osmo-trx/Transceiver52M/osmo-trx.cpp:600 #6 0x558e83dead6f in main /osmo-trx/Transceiver52M/osmo-trx.cpp:695 #7 0x7f23b2576151 in __libc_start_main (/usr/lib/libc.so.6+0x28151) Change-Id: Ibc4c7edeb9bba517db08fce152d863e6cc0c7bbb --- Transceiver52M/ChannelizerBase.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Transceiver52M/ChannelizerBase.cpp b/Transceiver52M/ChannelizerBase.cpp index e6eeed22..9910091f 100644 --- a/Transceiver52M/ChannelizerBase.cpp +++ b/Transceiver52M/ChannelizerBase.cpp @@ -244,6 +244,7 @@ ChannelizerBase::~ChannelizerBase() free(subFilters[i]); delete[] hist[i]; } + free(subFilters); fft_free(fftInput); fft_free(fftOutput);