From: Emil Velikov Date: Thu, 18 Jun 2015 19:22:54 +0000 (+0100) Subject: egl/wayland: cleanup dri2_wl_create_surface error path X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4ea5223a95436b76a3f808732c565e9833f84551;p=mesa.git egl/wayland: cleanup dri2_wl_create_surface error path Signed-off-by: Emil Velikov Reviewed-by: Marek Olšák --- diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index 6f42d90ed96..1e127607cdd 100644 --- a/src/egl/drivers/dri2/platform_wayland.c +++ b/src/egl/drivers/dri2/platform_wayland.c @@ -168,13 +168,11 @@ dri2_wl_create_surface(_EGLDriver *drv, _EGLDisplay *disp, dri2_surf); if (dri2_surf->dri_drawable == NULL) { _eglError(EGL_BAD_ALLOC, "dri2->createNewDrawable"); - goto cleanup_dri_drawable; + goto cleanup_surf; } return &dri2_surf->base; - cleanup_dri_drawable: - dri2_dpy->core->destroyDrawable(dri2_surf->dri_drawable); cleanup_surf: free(dri2_surf);