naccyde / rpms / systemd

Forked from rpms/systemd a year ago
Clone
65878a
From 855cfba6fb79066f46f02bbab09d498eda0d7cdd Mon Sep 17 00:00:00 2001
65878a
From: Michal Sekletar <msekleta@redhat.com>
65878a
Date: Thu, 13 Mar 2014 11:16:36 +0100
65878a
Subject: [PATCH] logind: uninitialized timer_fd is set to -1
65878a
65878a
---
65878a
 src/login/logind-session.c | 2 +-
65878a
 1 file changed, 1 insertion(+), 1 deletion(-)
65878a
65878a
diff --git a/src/login/logind-session.c b/src/login/logind-session.c
65878a
index b0e4bf6..730f11d 100644
65878a
--- a/src/login/logind-session.c
65878a
+++ b/src/login/logind-session.c
65878a
@@ -657,7 +657,7 @@ static int session_unlink_x11_socket(Session *s) {
65878a
 static void session_close_timer_fd(Session *s) {
65878a
         assert(s);
65878a
 
65878a
-        if (s->timer_fd <= 0)
65878a
+        if (s->timer_fd < 0)
65878a
                 return;
65878a
 
65878a
         hashmap_remove(s->manager->timer_fds, INT_TO_PTR(s->timer_fd + 1));