xserver: Branch 'master'

Adam Jackson ajax at nwnk.net
Fri Oct 10 11:07:36 PDT 2008


On Thu, 2008-10-09 at 22:52 -0700, Zhenyu Wang wrote:

> diff --git a/hw/xfree86/ddc/xf86DDC.c b/hw/xfree86/ddc/xf86DDC.c
> index 0d86776..ad8feef 100644
> --- a/hw/xfree86/ddc/xf86DDC.c
> +++ b/hw/xfree86/ddc/xf86DDC.c
> @@ -249,6 +249,7 @@ xf86DoEEDID(int scrnIndex, I2CBusPtr pBus, Bool complete)
>  
>  	tmp = xf86InterpretEEDID(scrnIndex, EDID_block);
>      }
> +    xfree(EDID_block);
>  
>      if (tmp && complete)
>  	tmp->flags |= EDID_COMPLETE_RAWDATA;

Nuh-uh. The raw block is stashed in a pointer in xf86MonPtr:

xf86MonPtr
xf86InterpretEDID(int scrnIndex, Uchar *block)
{
    xf86MonPtr m;

    if (!block) return NULL;
    if (! (m = xnfcalloc(sizeof(xf86Monitor),1))) return NULL;
    m->scrnIndex = scrnIndex;
    m->rawData = block;

    /* ... */

    return (m);

error:
    xfree(m);
    return NULL;
}

Reverted in master.  xf86MonPtr needs a proper destructor function.

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20081010/87db4943/attachment.pgp>


More information about the xorg mailing list