[Xcb] about xcb_image

Vincent Torri vtorri at univ-evry.fr
Sun Mar 9 04:03:35 PDT 2008


I think that I know how to deal correctly with the new xcb_image, but I 
think that i found a problem with xcb_image_create().

When base = data = NULL and size = ~0 (that is, when it's the user who 
manages his data), image->base may be not NULL, because we didn't calloc 
the xcb_image_t object. Hence, in xcb_image_destroy(), we try to free a 
memory that has maybe not been allocated.

I have solved the problem by just setting image->base to NULL after line 
267. I think that it's faster than a calloc.

Is it a correct fix ?

Vincent


More information about the Xcb mailing list