mirror of
https://github.com/troglobit/finit.git
synced 2026-10-23 11:44:37 +00:00
service_timeout_cb(): Check callback pointer before calling it
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
abb928f60b
commit
4191abc79f
1 file changed
+2
-1
+2
-1
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user