[gnome-settings-daemon/gnome-3-18] wacom: Plug leaks



commit 311df72e129361eda96fc37616bb14019960fd58
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Nov 2 19:31:38 2015 +0100

    wacom: Plug leaks
    
    The device array returned must be freed.

 plugins/wacom/gsd-wacom-manager.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-manager.c b/plugins/wacom/gsd-wacom-manager.c
index 5e35d32..e0f3f17 100644
--- a/plugins/wacom/gsd-wacom-manager.c
+++ b/plugins/wacom/gsd-wacom-manager.c
@@ -1105,6 +1105,8 @@ device_added_cb (GsdDeviceManager *device_manager,
 
        for (i = 0; i < n_gdk_devices; i++)
                gsd_wacom_manager_add_gdk_device (manager, devices[i]);
+
+       g_free (devices);
 }
 
 static void
@@ -1142,6 +1144,8 @@ device_removed_cb (GsdDeviceManager *device_manager,
 
        for (i = 0; i < n_gdk_devices; i++)
                gsd_wacom_manager_remove_gdk_device (manager, devices[i]);
+
+       g_free (devices);
 }
 
 static GsdWacomDevice *


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