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

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

Change-Id: I062c7636b59714860fa6b49a2d59c6528ebd57e3
changes/24/28724/2
Vadim Yanitskiy 6 months ago committed by laforge
parent 8942a2c72f
commit e33c236db0
  1. 3
      src/gprs_ms.c
  2. 3
      src/gprs_pcu.c

@ -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);

@ -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;

Loading…
Cancel
Save