service_timeout_cb(): Check callback pointer before calling it

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2018-01-19 16:07:22 +01:00
parent abb928f60b
commit 4191abc79f
+2 -1
View File
@@ -63,7 +63,8 @@ static void service_timeout_cb(uev_t *w, void *arg, int events)
svc_t *svc = arg;
/* Ignore any UEV_ERROR, we're a one-shot cb so just run it. */
svc->timer_cb(svc);
if (svc->timer_cb)
svc->timer_cb(svc);
}
/**