From: Matthias Clasen Date: Fri, 18 Sep 2009 20:32:01 +0000 (-0400) Subject: Bug 23761 – Some leaks X-Git-Tag: upstream/2.1.2~791 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8a2c95f987235a4a0b791e9b014844c53161b80a;p=platform%2Fupstream%2Fudisks2.git Bug 23761 – Some leaks g_hash_table_get_values returns a newly-allocated GList. The callers of devkit_disks_daemon_local_get_all_devices need to free it. Signed-off-by: David Zeuthen --- diff --git a/src/devkit-disks-device.c b/src/devkit-disks-device.c index 862380c..b6e0c7d 100644 --- a/src/devkit-disks-device.c +++ b/src/devkit-disks-device.c @@ -3360,6 +3360,8 @@ devkit_disks_device_local_partitions_are_busy (DevkitDisksDevice *device) } } + g_list_free (devices); + return ret; } @@ -3389,6 +3391,8 @@ devkit_disks_device_local_logical_partitions_are_busy (DevkitDisksDevice *device } } + g_list_free (devices); + return ret; } @@ -3591,6 +3595,8 @@ devkit_disks_device_changed (DevkitDisksDevice *device, GUdevDevice *d, gboolean force_removal (d, NULL, NULL); } } + + g_list_free (devices); } out: return keep_device; @@ -6790,6 +6796,9 @@ find_cleartext_device (DevkitDisksDevice *device) } out: + + g_list_free (devices); + return ret; } @@ -8719,6 +8728,8 @@ linux_md_start_completed_cb (DBusGMethodInvocation *context, } } + g_list_free (devices); + if (objpath != NULL) { dbus_g_method_return (context, objpath); } else { @@ -9047,6 +9058,8 @@ linux_md_create_completed_cb (DBusGMethodInvocation *context, } } + g_list_free (devices); + if (objpath != NULL) { dbus_g_method_return (context, objpath); } else {