[gdm] manager: fix display leak



commit 2774c7e43b9fdf5e5e59ef1f53ae7ba29f4aa23c
Author: Ray Strode <rstrode redhat com>
Date:   Thu Sep 10 09:35:52 2015 -0400

    manager: fix display leak
    
    If we're doing autologin then we prepare a stub greeter display that
    we don't actually end up using.  This commit makes sure the greeter
    display gets cleaned up so it doesn't stick around in the display
    store forever.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=749418

 daemon/gdm-manager.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index a2a60f2..c9e807d 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -1594,6 +1594,10 @@ on_start_user_session (StartUserSessionOperation *operation)
                 g_object_set_data (G_OBJECT (display), "gdm-embryonic-user-session", NULL);
                 g_object_set_data (G_OBJECT (operation->session), "gdm-display", NULL);
                 create_embryonic_user_session_for_display (operation->manager, display, allowed_uid);
+
+                /* remove the unused prepared greeter display since we're not going
+                 * to have a greeter */
+                gdm_display_store_remove (self->priv->display_store, display);
                 g_object_unref (display);
 
                 /* Give the user session a new display object for bookkeeping purposes */


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