chiark / gitweb /
event: don't disarm invalid timerfd
authorLennart Poettering <lennart@poettering.net>
Wed, 20 Nov 2013 17:19:05 +0000 (18:19 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 20 Nov 2013 19:58:17 +0000 (20:58 +0100)
src/libsystemd-bus/sd-event.c

index ec18af4..90cdeda 100644 (file)
@@ -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;