src: Stop using GSlice

It has been inofficially deprecated for years, is known to cause issues
with valgrind and potentially hides memory corruption.
Lets stop using it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1512>
This commit is contained in:
Robert Mader
2020-10-19 19:57:57 +02:00
parent 8b977e9046
commit 6eeeffdc68
39 changed files with 91 additions and 91 deletions

View File

@ -161,7 +161,7 @@ meta_wayland_subsurface_parent_state_applied (MetaWaylandSubsurface *subsurface)
if (!op->sibling)
{
g_slice_free (MetaWaylandSubsurfacePlacementOp, op);
g_free (op);
continue;
}
@ -188,7 +188,7 @@ meta_wayland_subsurface_parent_state_applied (MetaWaylandSubsurface *subsurface)
}
wl_list_remove (&op->sibling_destroy_listener.link);
g_slice_free (MetaWaylandSubsurfacePlacementOp, op);
g_free (op);
}
g_slist_free (surface->sub.pending_placement_ops);
@ -434,7 +434,7 @@ queue_subsurface_placement (MetaWaylandSurface *surface,
MetaWaylandSubsurfacePlacement placement)
{
MetaWaylandSubsurfacePlacementOp *op =
g_slice_new (MetaWaylandSubsurfacePlacementOp);
g_new0 (MetaWaylandSubsurfacePlacementOp, 1);
op->placement = placement;
op->sibling = sibling;