[gdm] daemon: Fix crash when typing password at screen lock
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] daemon: Fix crash when typing password at screen lock
- Date: Tue, 22 Jul 2014 15:31:09 +0000 (UTC)
commit 52e5154bb5d7c5a83be7d21e8c3b1126991218ef
Author: Bastien Nocera <hadess hadess net>
Date: Mon Jul 21 18:13:46 2014 +0200
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 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index 60f43b0..6349c1e 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]