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



commit 317217f6ea7f433b56d56edd1224ab369a526853
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 5750f6e..a06ced2 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]