[PATCH weston] gl-renderer: Fix an invalid write when closing a Weston window

Dima Ryazanov dima at gmail.com
Thu Nov 24 02:58:11 UTC 2016


To repro, run "valgrind weston --output-count=2", and close one of the
windows. (When you close the last window, there are even more errors, so
this particular one isn't as noticeable.)

On Wed, Nov 23, 2016 at 6:41 PM, Dima Ryazanov <dima at gmail.com> wrote:

> Call eglMakeCurrent before destroying the native EGL window, similar to
> what
> other sample clients are already doing.
>
> Signed-off-by: Dima Ryazanov <dima at gmail.com>
> ---
>  libweston/gl-renderer.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
> index d08bfd0..c6091af 100644
> --- a/libweston/gl-renderer.c
> +++ b/libweston/gl-renderer.c
> @@ -2760,6 +2760,10 @@ gl_renderer_output_destroy(struct weston_output
> *output)
>         for (i = 0; i < 2; i++)
>                 pixman_region32_fini(&go->buffer_damage[i]);
>
> +       eglMakeCurrent(gr->egl_display,
> +                      EGL_NO_SURFACE, EGL_NO_SURFACE,
> +                      EGL_NO_CONTEXT);
> +
>         weston_platform_destroy_egl_surface(gr->egl_display,
> go->egl_surface);
>
>         free(go);
> --
> 2.9.3
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20161123/b5af877d/attachment.html>


More information about the wayland-devel mailing list