[PATCH 2/4] glx: Fix memory leak in context garbage collection (v2)
Ian Romanick
idr at freedesktop.org
Tue Oct 8 11:04:48 PDT 2013
On 10/08/2013 10:19 AM, Mouse wrote:
>>> --- a/glx/createcontext.c
>>> +++ b/glx/createcontext.c
>>> @@ -320,7 +320,7 @@ __glXDisp_CreateContextAttribsARB(__GLXclientState * cl, GLbyte * pc)
>>> ctx->id = req->context;
>>> ctx->share_id = req->shareList;
>>> ctx->idExists = True;
>>> - ctx->isCurrent = False;
>>> + ctx->currentClient = False;
>>> ctx->isDirect = req->isDirect;
>>> ctx->hasUnflushedCommands = False;
>>> ctx->renderMode = GL_RENDER;
>
> Admittedly, I don't know glx internals, so I could be totally off base
> here. But the only declaration of currentClient I find is a pointer,
> not a boolean, which would make False conceptually wrong, even though
> if (as seems likely) False is #defined to 0 it's actually valid C.
>
> Should this maybe be 0 instead of False?
Good catch. It's just luck that False is #defined as 0. :) It should,
of course, be NULL.
> /~\ The ASCII Mouse
> \ / Ribbon Campaign
> X Against HTML mouse at rodents-montreal.org
> / \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
More information about the xorg-devel
mailing list