[PATCH glx] glx: avoid memory leak when using indirect rendering

Guilherme Melo gqmelo at gmail.com
Mon May 9 23:18:26 UTC 2016

On Mon, May 9, 2016 at 4:41 PM Adam Jackson <ajax at nwnk.net> wrote:

> On Mon, 2016-04-04 at 19:57 +0000, Guilherme Melo wrote:
> > Updated patch with some other places with a potential leak.
> Apologies for being so slow to look at this.
> Unfortunately I think it's incorrect.  lastGLContext is not necessarily
> of __GLXcontext type - glamor sets it a glamor_ctx *, for example - so
> passing it to ->loseCurrent isn't always going to work.
I think your first patch that only did the loseCurrent from
> __glXForceCurrent was closer to correct.

 Thanks for the feedback.

I did not know that lastGLContext was shared with glamor.
So it really seems the first patch is more appropriate. I just thought it
was confusing because it actually needs to lose the same context that it is
currently making current.

I'll resend the patch soon.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.x.org/archives/xorg-devel/attachments/20160509/9dbe2f77/attachment-0001.html>

More information about the xorg-devel mailing list