Blob Blame History Raw
From 9cfe924bb7bdfbb293686f2d636f461017f7c9dc Mon Sep 17 00:00:00 2001
From: Robert Ancell <robert.ancell@canonical.com>
Date: Fri, 11 May 2018 16:40:38 +1200
Subject: [PATCH] Fix compile warning and unfreed GError from 733d175

---
 src/session-child.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/session-child.c b/src/session-child.c
index 468534cf..eef51e49 100644
--- a/src/session-child.c
+++ b/src/session-child.c
@@ -765,12 +765,13 @@ session_child_run (int argc, char **argv)
             privileges_drop (user_get_uid (user), user_get_gid (user));
 
         g_autoptr(GError) error = NULL;
-        gboolean result = x_authority_write (x_authority, XAUTH_WRITE_MODE_REMOVE, x_authority_filename, &error);
+        x_authority_write (x_authority, XAUTH_WRITE_MODE_REMOVE, x_authority_filename, &error);
         if (drop_privileges)
             privileges_reclaim ();
 
         if (error)
             g_printerr ("Error removing X authority: %s\n", error->message);
+        g_clear_error (&error);
         /* Ignore this error, don't exit, continue closing the session. */
     }