summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@redhat.com>2013-01-17 11:57:43 +0100
committerTomas Bzatek <tbzatek@redhat.com>2013-01-17 11:57:43 +0100
commitfd135fe90ce9b9a568468c4ddb21e6d13135e80d (patch)
tree77a3a34834640f00797fb8b5e072b7356706231e /common
parent85e2ef5741bc0e165e6e74a70917bd7f0390444f (diff)
downloadgvfs-fd135fe90ce9b9a568468c4ddb21e6d13135e80d.tar.gz
Use g_list_free_full() where applicable
Diffstat (limited to 'common')
-rw-r--r--common/gmounttracker.c4
-rw-r--r--common/gvfsmountinfo.c3
2 files changed, 2 insertions, 5 deletions
diff --git a/common/gmounttracker.c b/common/gmounttracker.c
index 90b26222..2356fe40 100644
--- a/common/gmounttracker.c
+++ b/common/gmounttracker.c
@@ -267,9 +267,7 @@ g_mount_tracker_finalize (GObject *object)
g_mutex_clear (&tracker->lock);
- g_list_foreach (tracker->mounts,
- (GFunc)g_mount_info_unref, NULL);
- g_list_free (tracker->mounts);
+ g_list_free_full (tracker->mounts, (GDestroyNotify)g_mount_info_unref);
g_clear_object (&tracker->proxy);
g_clear_object (&tracker->connection);
diff --git a/common/gvfsmountinfo.c b/common/gvfsmountinfo.c
index cea2be4d..756bbd06 100644
--- a/common/gvfsmountinfo.c
+++ b/common/gvfsmountinfo.c
@@ -834,8 +834,7 @@ more_files_callback (GObject *source_object, GAsyncResult *res,
break;
}
- g_list_foreach (files, (GFunc)g_object_unref, NULL);
- g_list_free (files);
+ g_list_free_full (files, g_object_unref);
g_free (name_collation_key);
if (filename)