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

This commit is contained in:
Iain Lane 2019-09-20 10:17:59 +01:00
parent 2c8cce0dcc
commit b5ff6d1b21
No known key found for this signature in database
GPG key ID: E352D5C51C5041D4

View file

@ -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)