[gdm] worker: disconnect reauth handlers when freeing request



commit 4857796a4cc3a6913e16e1b193677dcce6f3b243
Author: Ray Strode <rstrode redhat com>
Date:   Mon Aug 20 23:32:59 2012 -0400

    worker: disconnect reauth handlers when freeing request
    
    If one client does multiple reauthentication requests, we
    need to clean up old requests properly.
    
    This commit ensures all old handlers are disconnected before
    freeing the request.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=682301

 daemon/gdm-session-worker.c |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
index 674fa5d..cccc8fa 100644
--- a/daemon/gdm-session-worker.c
+++ b/daemon/gdm-session-worker.c
@@ -2868,6 +2868,25 @@ gdm_session_worker_class_init (GdmSessionWorkerClass *klass)
 static void
 reauthentication_request_free (ReauthenticationRequest *request)
 {
+
+        g_signal_handlers_disconnect_by_func (request->session,
+                                              G_CALLBACK (on_reauthentication_client_connected),
+                                              request);
+        g_signal_handlers_disconnect_by_func (request->session,
+                                              G_CALLBACK (on_reauthentication_client_disconnected),
+                                              request);
+        g_signal_handlers_disconnect_by_func (request->session,
+                                              G_CALLBACK (on_reauthentication_cancelled),
+                                              request);
+        g_signal_handlers_disconnect_by_func (request->session,
+                                              G_CALLBACK (on_reauthentication_conversation_started),
+                                              request);
+        g_signal_handlers_disconnect_by_func (request->session,
+                                              G_CALLBACK (on_reauthentication_conversation_stopped),
+                                              request);
+        g_signal_handlers_disconnect_by_func (request->session,
+                                              G_CALLBACK (on_reauthentication_verification_complete),
+                                              request);
         g_clear_object (&request->session);
         g_slice_free (ReauthenticationRequest, request);
 }



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