[Xcb-commit] image

Julien Danjou jdanjou at kemper.freedesktop.org
Mon Sep 15 02:08:57 PDT 2008


 image/xcb_image.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 40ee0f75753ce30cec9c2cba4346c2eb31d3e8ec
Author: Henning Sten <henning.sten at yahoo.com>
Date:   Sun Sep 14 17:32:28 2008 +0200

    return on error to avoid null dereference in assert
    
    Signed-off-by: Julien Danjou <julien at danjou.info>

diff --git a/image/xcb_image.c b/image/xcb_image.c
index 10b4b0c..96a1fd2 100644
--- a/image/xcb_image.c
+++ b/image/xcb_image.c
@@ -357,8 +357,10 @@ xcb_image_get (xcb_connection_t *  conn,
   case XCB_IMAGE_FORMAT_Z_PIXMAP:
       image = xcb_image_create_native(conn, width, height, format,
 				      imrep->depth, imrep, bytes, data);
-      if (!image)
+      if (!image) {
 	  free(imrep);
+	  return 0;
+      }
       break;
   default:
       assert(0);


More information about the xcb-commit mailing list