[gnome-control-center/wip/laney/search-always-set-dialog-member: 133/133] cc-search-locations: Use `g_new0` instead of the slice allocator



commit b5ff6d1b217db3e9b4f051bb3bdedb85adc8ec60
Author: Iain Lane <iainl gnome org>
Date:   Fri Sep 20 10:17:59 2019 +0100

    cc-search-locations: Use `g_new0` instead of the slice allocator

 panels/search/cc-search-locations-dialog.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/panels/search/cc-search-locations-dialog.c b/panels/search/cc-search-locations-dialog.c
index 5dddb833d..be0d06d3d 100644
--- a/panels/search/cc-search-locations-dialog.c
+++ b/panels/search/cc-search-locations-dialog.c
@@ -81,7 +81,7 @@ place_new (CcSearchLocationsDialog *dialog,
            gchar *display_name,
            PlaceType place_type)
 {
-  Place *new_place = g_slice_new0 (Place);
+  Place *new_place = g_new0 (Place, 1);
 
   new_place->dialog = dialog;
   new_place->location = location;
@@ -103,7 +103,7 @@ place_free (Place * p)
   g_object_unref (p->location);
   g_free (p->display_name);
 
-  g_slice_free (Place, p);
+  g_free (p);
 }
 
 G_DEFINE_AUTOPTR_CLEANUP_FUNC (Place, place_free)


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