29 lines
976 B
Diff
29 lines
976 B
Diff
From d4b48de2495068d9b635a7ab475ace06476d5a42 Mon Sep 17 00:00:00 2001
|
|
From: Ionut Biru <ibiru@archlinux.org>
|
|
Date: Mon, 6 Dec 2010 17:44:44 -0800
|
|
Subject: [PATCH] Fix version in login window when file is empty
|
|
|
|
fgets return NULL and there is no point duplicating the line with random
|
|
value from buf.
|
|
|
|
Signed-off-by: Ionut Biru <ibiru@archlinux.org>
|
|
---
|
|
gui/simple-greeter/gdm-greeter-login-window.c | 1 +
|
|
1 files changed, 1 insertions(+), 0 deletions(-)
|
|
|
|
diff --git a/gui/simple-greeter/gdm-greeter-login-window.c b/gui/simple-greeter/gdm-greeter-login-window.c
|
|
index ca170a5..0823a3c 100644
|
|
--- a/gui/simple-greeter/gdm-greeter-login-window.c
|
|
+++ b/gui/simple-greeter/gdm-greeter-login-window.c
|
|
@@ -1096,6 +1096,7 @@ file_read_one_line (const char *filename)
|
|
|
|
if (fgets (buf, sizeof (buf), f) == NULL) {
|
|
g_warning ("Unable to read from file %s", filename);
|
|
+ goto out;
|
|
}
|
|
|
|
line = g_strdup (buf);
|
|
--
|
|
1.7.3.2
|
|
|