summaryrefslogtreecommitdiff
path: root/libsoup/soup-message-body.c
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2012-07-02 09:49:48 -0400
committerDan Winship <danw@gnome.org>2012-07-13 14:18:36 -0400
commitb3b7df0c0beea646479be468b888becce5336c87 (patch)
tree3d6fabd04ec1a92e53ad5ebeda744762c6e1c176 /libsoup/soup-message-body.c
parentf4650169ef770f96e42fb85c13737969adf5e7bb (diff)
downloadlibsoup-b3b7df0c0beea646479be468b888becce5336c87.tar.gz
Use g_slist_free_full()
Diffstat (limited to 'libsoup/soup-message-body.c')
-rw-r--r--libsoup/soup-message-body.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libsoup/soup-message-body.c b/libsoup/soup-message-body.c
index 9a6ad758..cfcc0bc4 100644
--- a/libsoup/soup-message-body.c
+++ b/libsoup/soup-message-body.c
@@ -544,11 +544,8 @@ void
soup_message_body_truncate (SoupMessageBody *body)
{
SoupMessageBodyPrivate *priv = (SoupMessageBodyPrivate *)body;
- GSList *iter;
- for (iter = priv->chunks; iter; iter = iter->next)
- soup_buffer_free (iter->data);
- g_slist_free (priv->chunks);
+ g_slist_free_full (priv->chunks, (GDestroyNotify)soup_buffer_free);
priv->chunks = priv->last = NULL;
priv->base_offset = 0;