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:
parent
a1d2cc5c64
commit
c25f6f2ded
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue