Mesa (master): egl/wayland: remove non-applicable destroyDrawable from error path
Emil Velikov
evelikov at kemper.freedesktop.org
Mon Nov 21 14:57:59 UTC 2016
Module: Mesa
Branch: master
Commit: 130b12f96a4e60c88e8ccd5e673413e0a8c0c127
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=130b12f96a4e60c88e8ccd5e673413e0a8c0c127
Author: Emil Velikov <emil.velikov at collabora.com>
Date: Fri Nov 11 16:45:00 2016 +0000
egl/wayland: remove non-applicable destroyDrawable from error path
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>
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 4fd4289..395f1e1 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -1752,7 +1752,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,
@@ -1760,8 +1760,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);
More information about the mesa-commit
mailing list