Barry Scott wrote:
> In miregion.c xfreeData macro: Why do a test on the size?
> Doesn't this lead to a leak of a malloc'ed block of memory?
> 
> #define xfreeData(reg) if ((reg)->data && (reg)->data->size) 
> xfree((reg)->data)

No. If the size is 0, then reg->data is miEmptyData (or the pixman
equivalent in more recent servers). This is a static global, is shared
amongst all single-rectangle regions, and can not be freed.

Peter Harris
-- 
               Open Text Connectivity Solutions Group
Peter Harris                    http://www.opentext.com/connectivity
Research and Development        Phone: +1 905 762 6001
peter.har...@opentext.com       Toll Free: 1 877 359 4866
_______________________________________________
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg

Reply via email to