summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2013-09-30 17:17:08 +1300
committerRobert Ancell <robert.ancell@canonical.com>2013-09-30 17:17:08 +1300
commit8ed2f13943d6885165d91908544ccbf23e75d089 (patch)
treef13c29c7d1fbb454be700ef0785e326be7ebb598
parentb6e072308f71448ee9541600c756c48409644983 (diff)
downloadlightdm-git-8ed2f13943d6885165d91908544ccbf23e75d089.tar.gz
Don't fail writing X authority if reading it had an error
-rw-r--r--src/xauthority.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/xauthority.c b/src/xauthority.c
index 445ac5ba..2eb4321a 100644
--- a/src/xauthority.c
+++ b/src/xauthority.c
@@ -237,7 +237,7 @@ write_string (int fd, const gchar *value)
gboolean
xauth_write (XAuthority *auth, XAuthWriteMode mode, const gchar *filename, GError **error)
{
- gchar *input;
+ gchar *input = NULL;
gsize input_length = 0, input_offset = 0;
GList *link, *records = NULL;
XAuthority *a;
@@ -328,6 +328,7 @@ xauth_write (XAuthority *auth, XAuthWriteMode mode, const gchar *filename, GErro
}
errno = 0;
+ result = TRUE;
for (link = records; link && result; link = link->next)
{
XAuthority *a = link->data;