[PULL] Fix an XQuartz regression freeing incorrectly in QuartzSetCursor
Jeremy Huddleston
jeremyhu at apple.com
Tue Jul 13 11:22:10 PDT 2010
On Jul 13, 2010, at 10:18, Keith Packard wrote:
> On Tue, 13 Jul 2010 08:29:22 -0700, Jeremy Huddleston <jeremyhu at apple.com
> > wrote:
>
>> Jeremy Huddleston (1):
>> XQuartz: Avoid a crash when mistakenly free()ing in
>> QuartzSetCursor on some configs
>
> I'd suggest just initializing 'data' to NULL instead of adding checks.
That's not the problem. The problem is that data is set to something
not freeable in some cases. I can put the ugly 'free_data' bool
inside of additional #if-foo, but the code is ugly enough as it is...
#ifdef ARGB_CURSOR
if (src->bits->argb != NULL)
{
#if BITMAP_BIT_ORDER == MSBFirst
rowbytes = src->bits->width * sizeof (CARD32);
data = (uint32_t *) src->bits->argb;
#else
>
> --
> keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3333 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100713/306e3d2a/attachment.bin>
More information about the xorg-devel
mailing list