anitazha / rpms / systemd

Forked from rpms/systemd 3 years ago
Clone

Blame SOURCES/0225-logind-uninitialized-timer_fd-is-set-to-1.patch

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