[gnome-control-center/gnome-3-24] search: Fix memory leak



commit a94e7a8330560e3b28b21c4796ad735be798d4a1
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date:   Sat Jun 17 11:03:30 2017 +0530

    search: Fix memory leak
    
    The container returned by g_variant_get_strv() should be
    freed with g_free().
    
    https://bugzilla.gnome.org/show_bug.cgi?id=783885

 panels/search/cc-search-locations-dialog.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/panels/search/cc-search-locations-dialog.c b/panels/search/cc-search-locations-dialog.c
index 1890764..6d268df 100644
--- a/panels/search/cc-search-locations-dialog.c
+++ b/panels/search/cc-search-locations-dialog.c
@@ -374,6 +374,8 @@ switch_tracker_get_mapping (GValue *value,
         break;
     }
 
+  g_free (locations);
+
   g_value_set_boolean (value, found);
   return TRUE;
 }


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