summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Borelli <pborelli@gnome.org>2014-09-28 17:06:56 +0200
committerDavid King <amigadave@amigadave.com>2015-01-28 12:03:23 +0000
commitcb661450c5e629e2ca8f633ef0ecf3d2a6e11e19 (patch)
tree2dea453b33309872528f2f1d740c1fae94929184
parente56e297b77a068faa2eb973e932d3d51fbcbbfb8 (diff)
downloadyelp-cb661450c5e629e2ca8f633ef0ecf3d2a6e11e19.tar.gz
Use g_async_queue_new_full instead of manually freeing
https://bugzilla.gnome.org/show_bug.cgi?id=737528
-rw-r--r--libyelp/yelp-transform.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libyelp/yelp-transform.c b/libyelp/yelp-transform.c
index f3cab6ee..04dc6303 100644
--- a/libyelp/yelp-transform.c
+++ b/libyelp/yelp-transform.c
@@ -123,7 +123,7 @@ static void
yelp_transform_init (YelpTransform *transform)
{
YelpTransformPrivate *priv = GET_PRIV (transform);
- priv->queue = g_async_queue_new ();
+ priv->queue = g_async_queue_new_full (g_free);
priv->chunks = g_hash_table_new_full (g_str_hash,
g_str_equal,
g_free,
@@ -182,9 +182,6 @@ yelp_transform_dispose (GObject *object)
debug_print (DB_FUNCTION, "entering\n");
if (priv->queue) {
- gchar *chunk_id;
- while ((chunk_id = (gchar *) g_async_queue_try_pop (priv->queue)))
- g_free (chunk_id);
g_async_queue_unref (priv->queue);
priv->queue = NULL;
}