summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/sd-event.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-11-20 18:19:05 +0100
committerLennart Poettering <lennart@poettering.net>2013-11-20 20:58:17 +0100
commitc57b5ca30199cbedaf45a0346c38977387359842 (patch)
treeed3266c36a032551bd5d70f841d2ccb6a0563bae /src/libsystemd-bus/sd-event.c
parent86befb4098e12688605a08bf602532de9a0ec863 (diff)
event: don't disarm invalid timerfd
Diffstat (limited to 'src/libsystemd-bus/sd-event.c')
-rw-r--r--src/libsystemd-bus/sd-event.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsystemd-bus/sd-event.c b/src/libsystemd-bus/sd-event.c
index ec18af43d5..90cdeda513 100644
--- a/src/libsystemd-bus/sd-event.c
+++ b/src/libsystemd-bus/sd-event.c
@@ -1412,6 +1412,9 @@ static int event_arm_timer(
a = prioq_peek(earliest);
if (!a || a->enabled == SD_EVENT_OFF) {
+ if (timer_fd < 0)
+ return 0;
+
if (*next == (usec_t) -1)
return 0;