[gnome-applets] tracker-search-bar: use g_list_free_full



commit 0e9f682c103390e8c674e980e13240839bad6131
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Fri Apr 3 23:12:38 2020 +0300

    tracker-search-bar: use g_list_free_full

 gnome-applets/tracker-search-bar/tracker-results-window.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gnome-applets/tracker-search-bar/tracker-results-window.c 
b/gnome-applets/tracker-search-bar/tracker-results-window.c
index c257d60c5..fc6d8329f 100644
--- a/gnome-applets/tracker-search-bar/tracker-results-window.c
+++ b/gnome-applets/tracker-search-bar/tracker-results-window.c
@@ -460,8 +460,7 @@ results_window_finalize (GObject *object)
        /* Clean up previous requests, this will call
         * g_cancellable_cancel() on each query still running.
         */
-       g_list_foreach (self->search_queries, (GFunc) search_query_free, NULL);
-       g_list_free (self->search_queries);
+       g_list_free_full (self->search_queries, (GDestroyNotify) search_query_free);
 
        G_OBJECT_CLASS (tracker_results_window_parent_class)->finalize (object);
 }
@@ -1421,8 +1420,7 @@ search_start (TrackerResultsWindow *window)
        /* Clean up previous requests, this will call
         * g_cancellable_cancel() on each query still running.
         */
-       g_list_foreach (window->search_queries, (GFunc) search_query_free, NULL);
-       g_list_free (window->search_queries);
+       g_list_free_full (window->search_queries, (GDestroyNotify) search_query_free);
 
        /* SPARQL requests */
        search_get (window, CATEGORY_IMAGE);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]