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: e8b890ab53a6 ("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
@ -1034,7 +1034,7 @@ meta_wayland_buffer_finalize (GObject *object)
|
|||||||
static void
|
static void
|
||||||
meta_wayland_buffer_init (MetaWaylandBuffer *buffer)
|
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
|
static void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user