[gnome-settings-daemon] mouse: Fix possible memory leak



commit 6e025e821a4d933054e0caaf2cac6ea335743992
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Mar 16 16:15:00 2011 +0000

    mouse: Fix possible memory leak

 plugins/mouse/gsd-mouse-manager.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/plugins/mouse/gsd-mouse-manager.c b/plugins/mouse/gsd-mouse-manager.c
index 085d793..18cafdf 100644
--- a/plugins/mouse/gsd-mouse-manager.c
+++ b/plugins/mouse/gsd-mouse-manager.c
@@ -1016,6 +1016,11 @@ gsd_mouse_manager_stop (GsdMouseManager *manager)
                 p->device_manager = NULL;
         }
 
+        if (p->mouse_a11y_settings != NULL) {
+                g_object_unref (p->mouse_a11y_settings);
+                p->mouse_a11y_settings = NULL;
+        }
+
         if (p->mouse_settings != NULL) {
                 g_object_unref (p->mouse_settings);
                 p->mouse_settings = NULL;
@@ -1041,6 +1046,9 @@ gsd_mouse_manager_finalize (GObject *object)
 
         g_return_if_fail (mouse_manager->priv != NULL);
 
+        if (mouse_manager->priv->device_manager != NULL)
+                g_signal_handler_disconnect (mouse_manager->priv->device_manager, mouse_manager->priv->device_added_id);
+
         if (mouse_manager->priv->mouse_settings != NULL)
                 g_object_unref (mouse_manager->priv->mouse_settings);
 



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