From 4222c6b9a09426168769b260e7ea469d250284c3 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Sun, 11 Feb 2018 16:38:04 +0100 Subject: [PATCH 1/4] fix mem leak in log_filter --- lib/src/common/log_filter.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/src/common/log_filter.cc b/lib/src/common/log_filter.cc index b498d466c..4d80a8523 100644 --- a/lib/src/common/log_filter.cc +++ b/lib/src/common/log_filter.cc @@ -91,6 +91,7 @@ void log_filter::all_log(srslte::LOG_LEVEL_ENUM level, str_ptr s_ptr(new std::string(ss.str())); logger_h->log(s_ptr); + delete(s_ptr); } } @@ -131,6 +132,7 @@ void log_filter::all_log(srslte::LOG_LEVEL_ENUM level, } str_ptr s_ptr(new std::string(ss.str())); logger_h->log(s_ptr); + delete s_ptr; } } From 1daf7b04bcd069cd0c069fe036067f85534283da Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Sun, 11 Feb 2018 19:32:07 +0100 Subject: [PATCH 2/4] add copyright header --- srsenb/src/mac/scheduler.cc | 25 +++++++++++++++++++++++++ srsenb/test/mac/scheduler_test.cc | 25 +++++++++++++++++++++++++ srsenb/test/upper/ip_test.cc | 26 ++++++++++++++++++++++++++ 3 files changed, 76 insertions(+) diff --git a/srsenb/src/mac/scheduler.cc b/srsenb/src/mac/scheduler.cc index 1f1a72764..51f161d4a 100644 --- a/srsenb/src/mac/scheduler.cc +++ b/srsenb/src/mac/scheduler.cc @@ -1,3 +1,28 @@ +/** + * + * \section COPYRIGHT + * + * Copyright 2013-2017 Software Radio Systems Limited + * + * \section LICENSE + * + * This file is part of srsLTE. + * + * srsUE is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * srsUE is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * A copy of the GNU Affero General Public License can be found in + * the LICENSE file in the top-level directory of this distribution + * and at http://www.gnu.org/licenses/. + * + */ #include diff --git a/srsenb/test/mac/scheduler_test.cc b/srsenb/test/mac/scheduler_test.cc index e9afd61cb..73dd531b0 100644 --- a/srsenb/test/mac/scheduler_test.cc +++ b/srsenb/test/mac/scheduler_test.cc @@ -1,3 +1,28 @@ +/** + * + * \section COPYRIGHT + * + * Copyright 2013-2017 Software Radio Systems Limited + * + * \section LICENSE + * + * This file is part of srsLTE. + * + * srsUE is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * srsUE is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * A copy of the GNU Affero General Public License can be found in + * the LICENSE file in the top-level directory of this distribution + * and at http://www.gnu.org/licenses/. + * + */ #include diff --git a/srsenb/test/upper/ip_test.cc b/srsenb/test/upper/ip_test.cc index e1edf981b..8052ed4d7 100644 --- a/srsenb/test/upper/ip_test.cc +++ b/srsenb/test/upper/ip_test.cc @@ -1,3 +1,29 @@ +/** + * + * \section COPYRIGHT + * + * Copyright 2013-2017 Software Radio Systems Limited + * + * \section LICENSE + * + * This file is part of srsLTE. + * + * srsUE is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * srsUE is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * A copy of the GNU Affero General Public License can be found in + * the LICENSE file in the top-level directory of this distribution + * and at http://www.gnu.org/licenses/. + * + */ + #include #include #include From 2734ce6600ea1da68c343d10c700cd4b16f01e1e Mon Sep 17 00:00:00 2001 From: Paul Sutton Date: Mon, 12 Feb 2018 15:33:57 +0000 Subject: [PATCH 3/4] Revert coverity badge change --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fa4355408..1567c7c71 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ srsLTE ======== -[![Coverity Scan Build Status](https://scan.coverity.com/projects/4721/badge.svg)](https://scan.coverity.com/projects/4721) +[![Coverity Scan Build Status](https://scan.coverity.com/projects/10045/badge.svg)](https://scan.coverity.com/projects/10045) srsLTE is a free and open-source LTE software suite developed by SRS (www.softwareradiosystems.com). From 81d8e7f70da56600b950ba4c5bf445b5ff8df738 Mon Sep 17 00:00:00 2001 From: Paul Sutton Date: Mon, 12 Feb 2018 17:17:27 +0000 Subject: [PATCH 4/4] Fix memory leak --- lib/src/upper/rlc_am.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/src/upper/rlc_am.cc b/lib/src/upper/rlc_am.cc index 59ce25576..413a02ac1 100644 --- a/lib/src/upper/rlc_am.cc +++ b/lib/src/upper/rlc_am.cc @@ -1309,6 +1309,7 @@ bool rlc_am::add_segment_and_check(rlc_amd_rx_pdu_segments_t *pdu, rlc_amd_rx_pd } handle_data_pdu(full_pdu->msg, full_pdu->N_bytes, header); + pool->deallocate(full_pdu); return true; }