sw/xlib: NULL-out pointers after freeing image data
authorBrian Paul <brianp@vmware.com>
Mon, 24 May 2010 22:20:30 +0000 (16:20 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 24 May 2010 22:21:55 +0000 (16:21 -0600)
commite5d0c730d124aa5ed380ed29162ea76329898844
tree585810dede2fb143c7dbbed1551ac36cb8447eed
parent8cbc1517c1ba508dbf4d19f6eee729cdd1df8c37
sw/xlib: NULL-out pointers after freeing image data

This fixes a double-free() error when not using a shared memory XImage.
The XDestroyImage() function frees the ximage->data buffer if non-NULL.
If we free it ourselves, we also need to NULL-out the pointer.
src/gallium/winsys/sw/xlib/xlib_sw_winsys.c