On Tue, 2010-02-23 at 01:06 +0100, Francisco Jerez wrote: 
> @@ -618,11 +662,17 @@ SProcDRI2Dispatch (ClientPtr client)
>      }
>  }
>  
> -static int DRI2DrawableGone(pointer p, XID id)
> +static int
> +DRI2DrawableGone(pointer p, XID id)
>  {
> -    DrawablePtr pDrawable = p;
> +    DrawablePtr pDraw = p;
>  
> -    DRI2DestroyDrawable(pDrawable);
> +    if (pDraw->id != id) {
> +     /* Secondary reference. */
> +     DRI2UntrackClient(pDraw, id);
> +    } else {
> +     DRI2DestroyDrawable(pDraw);
> +    }

This hunk causes a DRI2 buffer leak here. Just reverting it seems to
work fine (with X/Mesa drivers not actually making use of the new
functionality yet).

Is pDraw->id == id ever true here? Can't DRI2DestroyDrawable() still be
called unconditionally?


P.S. Please avoid mixing superfluous whitespace / naming changes in with
actual functional changes.

-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer

_______________________________________________
xorg-devel mailing list
[email protected]
http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to