[gtk] searchenginetracker: Don't leak the hits' GFiles



commit 337e6021436a418b740ee9d276b514d5749f9426
Author: Daniel Boles <dboles src gmail com>
Date:   Wed Jun 20 09:54:16 2018 +0100

    searchenginetracker: Don't leak the hits' GFiles
    
    https://gitlab.gnome.org/GNOME/gtk/merge_requests/206

 gtk/gtksearchenginetracker.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/gtk/gtksearchenginetracker.c b/gtk/gtksearchenginetracker.c
index 665f166955..4a8188d488 100644
--- a/gtk/gtksearchenginetracker.c
+++ b/gtk/gtksearchenginetracker.c
@@ -316,8 +316,12 @@ query_callback (GObject      *object,
 
   _gtk_search_engine_hits_added (GTK_SEARCH_ENGINE (tracker), hits);
   _gtk_search_engine_finished (GTK_SEARCH_ENGINE (tracker));
+
   g_list_free (hits);
+  for (i = 0; i < n; i++)
+    g_object_unref (hit[i].file);
   g_free (hit);
+
   g_variant_unref (reply);
   g_variant_unref (r);
 


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