[RFC] glx: fix DRI2 memory leak

Vasily Khoruzhick anarsoul at gmail.com
Thu Mar 26 13:02:52 PDT 2009


On Wednesday 25 March 2009 19:21:51 Jesse Barnes wrote:

> Has anyone else seen this leak?  Anyone care to educate me a bit more
> about GLX drawable lifetime rules?

Yep, my system suffer from this leak too.

>
> Thanks,
> Jesse
>
> diff --git a/glx/glxext.c b/glx/glxext.c
> index c882372..73e5a9b 100644
> --- a/glx/glxext.c
> +++ b/glx/glxext.c
> @@ -127,9 +127,9 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID
> xid) break;
>      }
>
> -    glxPriv->pDraw = NULL;
>      glxPriv->drawId = 0;
>      __glXUnrefDrawable(glxPriv);

Maybe, we should somehow check if glxPriv is still valid after Unref before 
assigning something to the pDraw? (I'm not sure, I'm not familiar with X 
internals)

> +    glxPriv->pDraw = NULL;
>
>      return True;
>  }
> _______________________________________________
> xorg mailing list
> xorg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xorg

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


More information about the xorg mailing list