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



commit abe21936b25c1029b92d1fd43af6bafb4c032fc6
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 714511b..3b54e21 100644
--- a/plugins/wacom/gsd-wacom-device.c
+++ b/plugins/wacom/gsd-wacom-device.c
@@ -1326,6 +1326,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]