From ec9bd5262847f8e697c1c43e14ba48030a44672b Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Mon, 28 Nov 2016 23:22:14 +0100 Subject: timer: only call the callback if not NULL Fix a crash in osmo-sgsn. Change-Id: I04d58d9580708cc0f6d0f4aa17d3e9f2c6235c8e --- src/timer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/timer.c b/src/timer.c index 10a0b95d..cc6d5ccd 100644 --- a/src/timer.c +++ b/src/timer.c @@ -241,7 +241,8 @@ int osmo_timers_update(void) restart: llist_for_each_entry(this, &timer_eviction_list, list) { osmo_timer_del(this); - this->cb(this->data); + if (this->cb) + this->cb(this->data); work = 1; goto restart; } -- cgit v1.2.3