diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2016-01-20 22:02:19 +0100 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2016-02-01 13:56:32 +0100 |
commit | c362df25a2eb469aa70827b469f3898447814697 (patch) | |
tree | d7d7e451c2d0a7f7e6096631ac03dfcfb446eae1 /src/bts.cpp | |
parent | 27dc9414757df5436f7f5a5c8708219aa7a1ee6d (diff) |
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
Diffstat (limited to 'src/bts.cpp')
-rw-r--r-- | src/bts.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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); } |