summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--image/xcb_image.c4
1 files changed, 3 insertions, 1 deletions
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);