[cogl/wip/rib/master-next: 4/5] egl: if texture_pixmap_x11_create fails free priv data
- From: Robert Bragg <rbragg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/wip/rib/master-next: 4/5] egl: if texture_pixmap_x11_create fails free priv data
- Date: Mon, 18 Jul 2011 14:27:34 +0000 (UTC)
commit addbe6c8d2ea3d805fc6c52ae32800f2ee5a439e
Author: Robert Bragg <robert linux intel com>
Date: Mon Jul 18 11:03:29 2011 +0100
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.
cogl/winsys/cogl-winsys-egl.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/cogl/winsys/cogl-winsys-egl.c b/cogl/winsys/cogl-winsys-egl.c
index 9717906..68bafa3 100644
--- a/cogl/winsys/cogl-winsys-egl.c
+++ b/cogl/winsys/cogl-winsys-egl.c
@@ -1581,7 +1581,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 :
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]