[gdm] manager: clean seed session when its display goes away



commit 259ef2d7d7acc4e7bb0602eea835b9585997413b
Author: Ray Strode <rstrode redhat com>
Date:   Fri Jan 23 14:25:05 2015 -0500

    manager: clean seed session when its display goes away
    
    If the display goes away right before the session exits, then we
    can crash because we'll try to finish the already finished display.
    
    This commit corrects the problem by making sure to dissociate the
    display from the seed session when the display is finished.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=719418

 daemon/gdm-manager.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index 0278512..684e462 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -1847,6 +1847,13 @@ touch_ran_once_marker_file (GdmManager *manager)
 }
 
 static void
+clean_seed_session (GdmSession *session)
+{
+        g_object_set_data (G_OBJECT (session), "gdm-display", NULL);
+        g_object_unref (session);
+}
+
+static void
 create_seed_session_for_display (GdmManager *manager,
                                  GdmDisplay *display,
                                  uid_t       allowed_user)
@@ -1933,7 +1940,7 @@ create_seed_session_for_display (GdmManager *manager,
                           G_CALLBACK (on_user_session_died),
                           manager);
         g_object_set_data (G_OBJECT (session), "gdm-display", display);
-        g_object_set_data_full (G_OBJECT (display), "gdm-seed-session", g_object_ref (session), 
(GDestroyNotify) g_object_unref);
+        g_object_set_data_full (G_OBJECT (display), "gdm-seed-session", g_object_ref (session), 
(GDestroyNotify) clean_seed_session);
 
         start_autologin_conversation_if_necessary (manager, display, session);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]