Change in osmo-bsc[master]: bts: Properly free ctr/stat when bts object is freed
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28003 ) Change subject: bts: Properly free ctr/stat when bts object is freed ...................................................................... bts: Properly free ctr/stat when bts object is freed Change-Id: Id213e21cf9bfc5439021e459c22ba4704d8cae2b --- M src/osmo-bsc/bts.c M tests/acc/acc_test.c M tests/gsm0408/gsm0408_test.c 3 files changed, 3 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/03/28003/1 diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c index 4066cf1..6a6520f 100644 --- a/src/osmo-bsc/bts.c +++ b/src/osmo-bsc/bts.c @@ -163,6 +163,9 @@ osmo_fsm_inst_free(bts->mo.fi); bts->mo.fi = NULL; } + + osmo_stat_item_group_free(bts->bts_statg); + rate_ctr_group_free(bts->bts_ctrs); return 0; } diff --git a/tests/acc/acc_test.c b/tests/acc/acc_test.c index 1e78f73..ce3b0cb 100644 --- a/tests/acc/acc_test.c +++ b/tests/acc/acc_test.c @@ -58,8 +58,6 @@ #define bts_del(bts) _bts_del(bts, __func__) static inline void _bts_del(struct gsm_bts *bts, const char *msg) { - osmo_stat_item_group_free(bts->bts_statg); - rate_ctr_group_free(bts->bts_ctrs); if (osmo_timer_pending(&bts->acc_mgr.rotate_timer)) osmo_timer_del(&bts->acc_mgr.rotate_timer); if (osmo_timer_pending(&bts->acc_ramp.step_timer)) diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index a7270a4..03b2ee1 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -137,8 +137,6 @@ #define bts_del(bts) _bts_del(bts, __func__) static inline void _bts_del(struct gsm_bts *bts, const char *msg) { - osmo_stat_item_group_free(bts->bts_statg); - rate_ctr_group_free(bts->bts_ctrs); if (osmo_timer_pending(&bts->acc_mgr.rotate_timer)) osmo_timer_del(&bts->acc_mgr.rotate_timer); /* no need to llist_del(&bts->list), we never registered the bts there. */ -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28003 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Id213e21cf9bfc5439021e459c22ba4704d8cae2b Gerrit-Change-Number: 28003 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-MessageType: newchange
participants (1)
-
pespin