fixeria has uploaded this change for review.

View Change

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

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

Change-Id: I062c7636b59714860fa6b49a2d59c6528ebd57e3
---
M src/gprs_ms.c
M src/gprs_pcu.c
2 files changed, 2 insertions(+), 4 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/24/28724/1
diff --git a/src/gprs_ms.c b/src/gprs_ms.c
index 6daab31..3ed4244 100644
--- a/src/gprs_ms.c
+++ b/src/gprs_ms.c
@@ -142,8 +142,7 @@

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);
diff --git a/src/gprs_pcu.c b/src/gprs_pcu.c
index ecb7f29..de6b669 100644
--- a/src/gprs_pcu.c
+++ b/src/gprs_pcu.c
@@ -65,8 +65,7 @@
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;

To view, visit change 28724. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I062c7636b59714860fa6b49a2d59c6528ebd57e3
Gerrit-Change-Number: 28724
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de>
Gerrit-MessageType: newchange