[gnome-settings-daemon/gnome-3-4] wacom: Fix crasher on hotplug



commit 45fe6b84f9b739b92823d7a63760f2cbd248418a
Author: Bastien Nocera <hadess hadess net>
Date:   Fri May 25 12:45:17 2012 +0100

    wacom: Fix crasher on hotplug
    
    And pretty important memleaks.
    
    The styli were never destroyed, so their settings objects were still
    alive and receiving signals when they should have been destroyed.

 plugins/wacom/gsd-wacom-device.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-device.c b/plugins/wacom/gsd-wacom-device.c
index f995546..f8a474b 100644
--- a/plugins/wacom/gsd-wacom-device.c
+++ b/plugins/wacom/gsd-wacom-device.c
@@ -1322,6 +1322,9 @@ gsd_wacom_device_finalize (GObject *object)
                 p->wacom_settings = NULL;
         }
 
+        g_list_foreach (p->styli, (GFunc) g_object_unref, NULL);
+        g_list_free (p->styli);
+
         g_list_foreach (p->buttons, (GFunc) gsd_wacom_tablet_button_free, NULL);
         g_list_free (p->buttons);
 



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