EXT: [PATCH weston 2/2] libweston: fix output destroy signal list corruption

Ray, Ian (GE Healthcare) ian.ray at ge.com
Tue May 22 11:01:27 UTC 2018



> On 22 May 2018, at 13.34, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> 
> From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> 
> This issue was likely introduced by "libweston: add
> weston_view_set_output()" which forgot to ensure the output destroy
> listener is removed when weston_view is destroyed, leading to freed
> memory being left into the list.
> 
> This was quite easy to trigger by opening and closing an application
> window a few times, leading various memory corruption symptoms.
> 

Reviewed-by: Ian Ray <ian.ray at ge.com>


> Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> ---
> libweston/compositor.c | 1 +
> 1 file changed, 1 insertion(+)
> 
> diff --git a/libweston/compositor.c b/libweston/compositor.c
> index 6a300e0d..619e88b3 100644
> --- a/libweston/compositor.c
> +++ b/libweston/compositor.c
> @@ -1931,6 +1931,7 @@ weston_view_destroy(struct weston_view *view)
> 	pixman_region32_fini(&view->transform.opaque);
> 
> 	weston_view_set_transform_parent(view, NULL);
> +	weston_view_set_output(view, NULL);
> 
> 	wl_list_remove(&view->surface_link);
> 
> -- 
> 2.16.1
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel



More information about the wayland-devel mailing list