1
0
Fork 0

wayland/buffer: Pass g_object_unref to g_ptr_array_new_with_free_func

The release_points array holds pointers to MetaWaylandSyncPoint objects.

Fixes leaking references (and ultimately the underlying memory) for the
array elements.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3442
Fixes: e8b890ab53 ("wayland: Implement linux-drm-syncobj-v1")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3710>
This commit is contained in:
Michel Dänzer 2024-04-19 12:01:10 +02:00 committed by Marge Bot
parent a1d2cc5c64
commit c25f6f2ded

View file

@ -1034,7 +1034,7 @@ meta_wayland_buffer_finalize (GObject *object)
static void
meta_wayland_buffer_init (MetaWaylandBuffer *buffer)
{
buffer->release_points = g_ptr_array_new_with_free_func (g_free);
buffer->release_points = g_ptr_array_new_with_free_func (g_object_unref);
}
static void