summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2012-01-05 04:27:20 +0100
committerJavier Jardón <jjardon@gnome.org>2012-01-05 04:57:47 +0100
commitc735b54a6384ff170ca32906ad7eae64a338e1d6 (patch)
treec47482d4b1f88cf984684406975f42c20d158318
parent31c3082e19551377049742a7862dab455727844a (diff)
downloadglib-c735b54a6384ff170ca32906ad7eae64a338e1d6.tar.gz
gio/*: Use g_slist_free_full() convenience function
-rw-r--r--gio/gfilemonitor.c3
-rw-r--r--gio/gmemoryinputstream.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/gio/gfilemonitor.c b/gio/gfilemonitor.c
index 6bad28047..27b800a54 100644
--- a/gio/gfilemonitor.c
+++ b/gio/gfilemonitor.c
@@ -195,8 +195,7 @@ g_file_monitor_dispose (GObject *object)
g_source_unref (priv->pending_file_change_source);
priv->pending_file_change_source = NULL;
}
- g_slist_foreach (priv->pending_file_changes, (GFunc) file_change_free, NULL);
- g_slist_free (priv->pending_file_changes);
+ g_slist_free_full (priv->pending_file_changes, (GDestroyNotify) file_change_free);
priv->pending_file_changes = NULL;
/* Make sure we cancel on last unref */
diff --git a/gio/gmemoryinputstream.c b/gio/gmemoryinputstream.c
index 2a57dbd0d..f990c7b7f 100644
--- a/gio/gmemoryinputstream.c
+++ b/gio/gmemoryinputstream.c
@@ -160,8 +160,7 @@ g_memory_input_stream_finalize (GObject *object)
stream = G_MEMORY_INPUT_STREAM (object);
priv = stream->priv;
- g_slist_foreach (priv->chunks, free_chunk, NULL);
- g_slist_free (priv->chunks);
+ g_slist_free_full (priv->chunks, free_chunk);
G_OBJECT_CLASS (g_memory_input_stream_parent_class)->finalize (object);
}