mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
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:
@ -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;
|
||||
|
Reference in New Issue
Block a user