[epiphany/wip/adblocker: 4/8] uri-tester: Use g_slist_free_full
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/adblocker: 4/8] uri-tester: Use g_slist_free_full
- Date: Fri, 11 Sep 2015 02:14:22 +0000 (UTC)
commit d1ab30e7a1c7d434d62537da77452daa8525a34f
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Thu Sep 10 18:08:23 2015 -0500
uri-tester: Use g_slist_free_full
embed/web-extension/uri-tester.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/embed/web-extension/uri-tester.c b/embed/web-extension/uri-tester.c
index 6b3690d..0690a17 100644
--- a/embed/web-extension/uri-tester.c
+++ b/embed/web-extension/uri-tester.c
@@ -854,8 +854,7 @@ uri_tester_finalize (GObject *object)
LOG ("UriTester finalizing %p", object);
- g_slist_foreach (priv->filters, (GFunc) g_free, NULL);
- g_slist_free (priv->filters);
+ g_slist_free_full (priv->filters, g_free);
g_free (priv->data_dir);
g_hash_table_destroy (priv->pattern);
@@ -924,10 +923,7 @@ uri_tester_set_filters (UriTester *tester, GSList *filters)
UriTesterPrivate *priv = tester->priv;
if (priv->filters)
- {
- g_slist_foreach (priv->filters, (GFunc) g_free, NULL);
- g_slist_free (priv->filters);
- }
+ g_slist_free_full (priv->filters, g_free);
priv->filters = filters;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]