summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2014-07-21 18:13:46 +0200
committerBastien Nocera <hadess@hadess.net>2014-07-22 17:30:45 +0200
commit52e5154bb5d7c5a83be7d21e8c3b1126991218ef (patch)
treec3ca3a66527d93aaf6de8fc8ebeb2b7c779d8d64
parentd62d46f08819fe45c8b90ddc1987a2cb4b774a70 (diff)
downloadgdm-52e5154bb5d7c5a83be7d21e8c3b1126991218ef.tar.gz
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
-rw-r--r--daemon/gdm-manager.c5
1 files 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