valeriyvdovin / rpms / systemd

Forked from rpms/systemd 4 years ago
Clone

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

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