From 52e5154bb5d7c5a83be7d21e8c3b1126991218ef Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Mon, 21 Jul 2014 18:13:46 +0200 Subject: daemon: Fix crash when typing password at screen lock open_reauthentication_requests is a hashtable which contains GDBusMethodInvocations as values. We insert them in the hashtable with only one reference, the one coming from the D-Bus method call. But when a reauthentication starts, gdm_dbus_manager_complete_open_reauthentication_channel() is called which internally calls g_dbus_method_invocation_return_value(). This will eat the only reference, and we'll then try to remove the invocation from the hash table, unref'ing a dead object. Instead, remove the invocation from the hashtable without unref'ing (once too much). https://bugzilla.gnome.org/show_bug.cgi?id=733485 --- daemon/gdm-manager.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c index 60f43b05..6349c1e6 100644 --- a/daemon/gdm-manager.c +++ b/daemon/gdm-manager.c @@ -1794,13 +1794,12 @@ on_session_reauthentication_started (GdmSession *session, source_tag); if (invocation != NULL) { + g_hash_table_steal (manager->priv->open_reauthentication_requests, + source_tag); gdm_dbus_manager_complete_open_reauthentication_channel (GDM_DBUS_MANAGER (manager), invocation, address); } - - g_hash_table_remove (manager->priv->open_reauthentication_requests, - source_tag); } static void -- cgit v1.2.1