From f8303acba7b6131b1d057efa164ce5876af3033f Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Sat, 17 Feb 2018 21:37:48 +0100 Subject: [PATCH 1/2] Fixed memory leak in logger_stdout --- lib/include/srslte/common/logger_stdout.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/include/srslte/common/logger_stdout.h b/lib/include/srslte/common/logger_stdout.h index 00e4ffa7a..b76faadaf 100644 --- a/lib/include/srslte/common/logger_stdout.h +++ b/lib/include/srslte/common/logger_stdout.h @@ -42,7 +42,10 @@ namespace srslte { { public: void log(std::string *msg) { - fprintf(stdout, "%s", msg->c_str()); + if (msg) { + fprintf(stdout, "%s", msg->c_str()); + delete msg; + } } }; From d959608e10373c83fa4a6284448425cfccf71459 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Tue, 20 Feb 2018 11:44:46 +0100 Subject: [PATCH 2/2] fix mem dealloc in viterbi for 16bit AVX --- lib/src/phy/fec/viterbi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/src/phy/fec/viterbi.c b/lib/src/phy/fec/viterbi.c index 25d77ef36..4e5801b94 100644 --- a/lib/src/phy/fec/viterbi.c +++ b/lib/src/phy/fec/viterbi.c @@ -166,9 +166,15 @@ void free37_avx2_16bit(void *o) { if (q->symbols_uc) { free(q->symbols_uc); } + if (q->symbols_us) { + free(q->symbols_us); + } if (q->tmp) { free(q->tmp); } + if (q->tmp_s) { + free(q->tmp_s); + } delete_viterbi37_avx2_16bit(q->ptr); }