{ms,gprs_pcu}_talloc_destructor(): call osmo_timer_del() unconditionally

osmo_timer_del() does check if a timer is active internally.

Change-Id: I062c7636b59714860fa6b49a2d59c6528ebd57e3
This commit is contained in:
Vadim Yanitskiy 2022-07-22 03:44:44 +07:00 committed by laforge
parent 8942a2c72f
commit e33c236db0
2 changed files with 2 additions and 4 deletions

View File

@ -142,8 +142,7 @@ static int ms_talloc_destructor(struct GprsMs *ms)
ms_set_reserved_slots(ms, NULL, 0, 0);
if (osmo_timer_pending(&ms->timer))
osmo_timer_del(&ms->timer);
osmo_timer_del(&ms->timer);
if (ms->ul_tbf) {
tbf_set_ms((struct gprs_rlcmac_tbf *)ms->ul_tbf, NULL);

View File

@ -65,8 +65,7 @@ static int gprs_pcu_talloc_destructor(struct gprs_pcu *pcu)
while ((bts = llist_first_entry_or_null(&pcu->bts_list, struct gprs_rlcmac_bts, list)))
talloc_free(bts);
if (osmo_timer_pending(&pcu->update_stats_timer))
osmo_timer_del(&pcu->update_stats_timer);
osmo_timer_del(&pcu->update_stats_timer);
neigh_cache_free(pcu->neigh_cache);
si_cache_free(pcu->si_cache);
return 0;