[PATCH weston] gl-renderer: gl_renderer_create display cleanup on error

Pekka Paalanen ppaalanen at gmail.com
Fri Aug 21 05:02:10 PDT 2015


On Fri, 21 Aug 2015 00:20:54 -0300
Dawid Gajownik <gajownik at gmail.com> wrote:

> Clean up display connection via eglTerminate() in case of EGL
> initialisation error.
> 
> Signed-off-by: Dawid Gajownik <gajownik at gmail.com>
> ---
>  src/gl-renderer.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/src/gl-renderer.c b/src/gl-renderer.c
> index fd0720e..d7231f4 100644
> --- a/src/gl-renderer.c
> +++ b/src/gl-renderer.c
> @@ -2649,7 +2649,7 @@ gl_renderer_create(struct weston_compositor *ec, EGLenum platform,
>  	if (egl_choose_config(gr, attribs, visual_id,
>  			      n_ids, &gr->egl_config) < 0) {
>  		weston_log("failed to choose EGL config\n");
> -		goto fail;
> +		goto fail_terminate;
>  	}
>  
>  	ec->renderer = &gr->base;
> @@ -2672,6 +2672,8 @@ gl_renderer_create(struct weston_compositor *ec, EGLenum platform,
>  
>  fail_with_error:
>  	gl_renderer_print_egl_error_state();
> +fail_terminate:
> +	eglTerminate(gr->egl_display);
>  fail:
>  	free(gr);
>  	return -1;

Works for me, pushed:
   89c49b3..1a912a9  master -> master


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20150821/caacd0ce/attachment.sig>


More information about the wayland-devel mailing list