egl: if texture_pixmap_x11_create fails free priv data

This makes sure the egl winsys frees the private egl_tex_pixmap state if
in _cogl_winsys_texture_pixmap_x11_create if there is a failure to
create an EGLImage.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
Robert Bragg 2011-07-18 11:03:29 +01:00
parent 83db796744
commit 6d79657f76

View File

@ -1582,7 +1582,10 @@ _cogl_winsys_texture_pixmap_x11_create (CoglTexturePixmapX11 *tex_pixmap)
(EGLClientBuffer)tex_pixmap->pixmap,
attribs);
if (egl_tex_pixmap->image == EGL_NO_IMAGE_KHR)
return FALSE;
{
g_free (egl_tex_pixmap);
return FALSE;
}
texture_format = (tex_pixmap->depth >= 32 ?
COGL_PIXEL_FORMAT_RGBA_8888_PRE :