From c362df25a2eb469aa70827b469f3898447814697 Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Wed, 20 Jan 2016 22:02:19 +0100 Subject: pcu: Fix memory corruption bugs (ASAN) ASAN has found improper deletion of objects. These only occur on shutdown but makes it impossible to run the test cases with full ASAN support. This commit fixes some of them and deactivates the freeing of the_pcu.bctx which may cause a corruption in BTS::~BTS() later on. Note that the latter is only a work-aound and should be fixed properly. It will leak bctx objects, but this is currently not critical, since gprs_bssgp_destroy is only called once, immediately before a call to exit(). Ticket: OW#1572 Sponsored-by: On-Waves ehf --- src/bts.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/bts.cpp') diff --git a/src/bts.cpp b/src/bts.cpp index 5e29364e..d1d738c6 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -150,7 +150,12 @@ BTS::BTS() BTS::~BTS() { + /* this can cause counter updates and must not be left to the + * m_ms_store's destructor */ + m_ms_store.cleanup(); + rate_ctr_group_free(m_ratectrs); + osmo_stat_item_group_free(m_statg); } -- cgit v1.2.3