[gdm] session: disconnect signals from worker proxy when conversation is freed
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] session: disconnect signals from worker proxy when conversation is freed
- Date: Sun, 15 Nov 2015 19:10:12 +0000 (UTC)
commit 5ac224602f1d603aac5eaa72e1760d3e33a26f0a
Author: Ray Strode <rstrode redhat com>
Date: Fri Nov 13 11:14:59 2015 -0500
session: disconnect signals from worker proxy when conversation is freed
We don't want an outstanding reference on the worker proxy to lead to
signal handlers getting dispatched after the conversation is freed.
https://bugzilla.gnome.org/show_bug.cgi?id=758032
daemon/gdm-session.c | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index 1d0de88..1eff3d1 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -1678,7 +1678,28 @@ free_conversation (GdmSessionConversation *conversation)
g_free (conversation->starting_username);
g_free (conversation->session_id);
g_clear_object (&conversation->worker_manager_interface);
- g_clear_object (&conversation->worker_proxy);
+
+ if (conversation->worker_proxy != NULL) {
+ g_signal_handlers_disconnect_by_func (conversation->worker_proxy,
+ G_CALLBACK (worker_on_username_changed),
+ conversation);
+ g_signal_handlers_disconnect_by_func (conversation->worker_proxy,
+ G_CALLBACK (worker_on_session_exited),
+ conversation);
+ g_signal_handlers_disconnect_by_func (conversation->worker_proxy,
+ G_CALLBACK (worker_on_reauthenticated),
+ conversation);
+ g_signal_handlers_disconnect_by_func (conversation->worker_proxy,
+ G_CALLBACK (worker_on_saved_language_name_read),
+ conversation);
+ g_signal_handlers_disconnect_by_func (conversation->worker_proxy,
+ G_CALLBACK (worker_on_saved_session_name_read),
+ conversation);
+ g_signal_handlers_disconnect_by_func (conversation->worker_proxy,
+ G_CALLBACK (worker_on_cancel_pending_query),
+ conversation);
+ g_clear_object (&conversation->worker_proxy);
+ }
g_clear_object (&conversation->session);
g_free (conversation);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]