Mesa (master): egl_dri2: Return NULL when xcb_get_geometry_reply fails.

Chia-I Wu olv at kemper.freedesktop.org
Sun Feb 20 19:26:59 UTC 2011


Module: Mesa
Branch: master
Commit: bf0c56522e21bd45ad3385e3115ef7eb71a7b8bf
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bf0c56522e21bd45ad3385e3115ef7eb71a7b8bf

Author: Chia-I Wu <olv at lunarg.com>
Date:   Sun Feb 20 12:23:54 2011 -0700

egl_dri2: Return NULL when xcb_get_geometry_reply fails.

This should fix bug #33946.

---

 src/egl/drivers/dri2/platform_x11.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
index 1c7c841..50310ee 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -782,6 +782,7 @@ dri2_create_image_khr_pixmap(_EGLDisplay *disp, _EGLContext *ctx,
       _eglError(EGL_BAD_ALLOC, "xcb_get_geometry");
       free(error);
       free(buffers_reply);
+      return NULL;
    }
 
    switch (geometry_reply->depth) {




More information about the mesa-commit mailing list