diff options
author | Ray Strode <rstrode@redhat.com> | 2015-01-23 14:25:05 -0500 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2015-01-23 14:29:36 -0500 |
commit | 259ef2d7d7acc4e7bb0602eea835b9585997413b (patch) | |
tree | 4af50cd769dcb02ac9908eee7cb3908d863a7c97 | |
parent | b8c0b3b900a75d55b5bec078ee7045958c19b718 (diff) | |
download | gdm-259ef2d7d7acc4e7bb0602eea835b9585997413b.tar.gz |
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
-rw-r--r-- | 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 02785126..684e462e 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); } |