[gnome-control-center] search: Fix a GFile leak



commit f32b305a1a82920ebb8965740d7a9d494ed3bb89
Author: Rui Matos <tiagomatos gmail com>
Date:   Mon Jun 19 11:30:12 2017 +0200

    search: Fix a GFile leak
    
    https://bugzilla.gnome.org/show_bug.cgi?id=783885

 panels/search/cc-search-locations-dialog.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/panels/search/cc-search-locations-dialog.c b/panels/search/cc-search-locations-dialog.c
index 6d268df..3d2ec8a 100644
--- a/panels/search/cc-search-locations-dialog.c
+++ b/panels/search/cc-search-locations-dialog.c
@@ -370,7 +370,10 @@ switch_tracker_get_mapping (GValue *value,
   for (idx = 0; locations[idx] != NULL; idx++)
     {
       location = g_file_new_for_path (path_from_tracker_dir(locations[idx]));
-      if ((found = g_file_equal (location, place->location)))
+      found = g_file_equal (location, place->location);
+      g_object_unref (location);
+
+      if (found)
         break;
     }
 


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