From 3c25e2b16cfbd1e417375f94b70be18f0eb082a9 Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Mon, 16 Sep 2019 13:18:32 +0200 Subject: [PATCH] SCell Search Test: Return success always if test is finished --- srsue/test/phy/scell_search_test.cc | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/srsue/test/phy/scell_search_test.cc b/srsue/test/phy/scell_search_test.cc index 566bed4a8..3b44c905a 100644 --- a/srsue/test/phy/scell_search_test.cc +++ b/srsue/test/phy/scell_search_test.cc @@ -364,6 +364,8 @@ int parse_args(int argc, char** argv) int main(int argc, char** argv) { + int ret = SRSLTE_SUCCESS; + // Parse args if (parse_args(argc, argv)) { return SRSLTE_ERROR; @@ -624,11 +626,25 @@ int main(int argc, char** argv) free(baseband_buffer); } + for (auto& ptr : data_tx) { + if (ptr) { + free(ptr); + } + } for (auto& sb : softbuffer_tx) { if (sb) { + srslte_softbuffer_tx_free(sb); free(sb); } } - srslte_dft_exit(); + atexit(srslte_dft_exit); + + if (ret) { + printf("Error\n"); + } else { + printf("Ok\n"); + } + + return ret; }