[Mesa-dev] [PATCH 2/3] egl/wayland: remove non-applicable destroyDrawable from error path
Eric Engestrom
eric.engestrom at imgtec.com
Wed Nov 16 14:24:23 UTC 2016
On Friday, 2016-11-11 16:45:00 +0000, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov at collabora.com>
>
> If we fail to create the drawable there's not much point in attampting
> to destroy it.
>
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
The rest of this series needs more work, but this patch is
self-contained so it can be pushed already, and is:
Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
> ---
> src/egl/drivers/dri2/platform_wayland.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
> index f39dcb9..b5a0c8c 100644
> --- a/src/egl/drivers/dri2/platform_wayland.c
> +++ b/src/egl/drivers/dri2/platform_wayland.c
> @@ -1753,7 +1753,7 @@ dri2_wl_swrast_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
> config, dri2_surf);
> if (dri2_surf->dri_drawable == NULL) {
> _eglError(EGL_BAD_ALLOC, "swrast->createNewDrawable");
> - goto cleanup_dri_drawable;
> + goto cleanup_surf;
> }
>
> dri2_wl_swap_interval(drv, disp, &dri2_surf->base,
> @@ -1761,8 +1761,6 @@ dri2_wl_swrast_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
>
> return &dri2_surf->base;
>
> - cleanup_dri_drawable:
> - dri2_dpy->core->destroyDrawable(dri2_surf->dri_drawable);
> cleanup_surf:
> free(dri2_surf);
>
> --
> 2.10.2
>
More information about the mesa-dev
mailing list