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
signature.asc
Description: This is a digitally signed message part
_______________________________________________ xorg mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/xorg
