xserver: Branch 'master' - 5 commits
Eric Anholt
eric at anholt.net
Mon Feb 2 11:03:51 PST 2009
On Mon, 2009-02-02 at 11:20 +0100, Michel Dänzer wrote:
> On Sun, 2009-02-01 at 09:26 -0800, Eric Anholt wrote:
> >
> > commit 29b3b88dc744f4919c6709747ddb7baac47486c5
> > Author: Pierre Willenbrock <pierre at pirsoft.de>
> > Date: Fri Jan 30 21:16:48 2009 -0800
> >
> > Prevent double unref of glxdrawables
> >
> > Found by valgrind. Bug #18917.
> >
> > diff --git a/glx/glxcmds.c b/glx/glxcmds.c
> > index af52672..33954ee 100644
> > --- a/glx/glxcmds.c
> > +++ b/glx/glxcmds.c
> > @@ -146,6 +146,8 @@ __glXContextDestroy(__GLXcontext *context)
> > __glXUnrefDrawable(context->drawPriv);
> > if (context->readPriv)
> > __glXUnrefDrawable(context->readPriv);
> > + context->drawPriv = NULL;
> > + context->readPriv = NULL;
> > }
> > __glXFlushContextCache();
> > }
> > @@ -621,6 +623,8 @@ DoMakeCurrent(__GLXclientState *cl,
> > __glXUnrefDrawable(prevglxc->drawPriv);
> > if (prevglxc->readPriv)
> > __glXUnrefDrawable(prevglxc->readPriv);
> > + prevglxc->drawPriv = NULL;
> > + prevglxc->readPriv = NULL;
> > }
> > }
> >
> > diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
> > index 30308ad..40352b4 100644
> > --- a/hw/xfree86/modes/xf86Crtc.c
> > +++ b/hw/xfree86/modes/xf86Crtc.c
> > @@ -3159,9 +3159,6 @@ xf86_crtc_supports_gamma(ScrnInfoPtr pScrn)
> > xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
> > xf86CrtcPtr crtc;
> >
> > - if (!xf86_config)
> > - return FALSE;
> > -
> > if (xf86_config->num_crtc == 0)
> > return FALSE;
> > crtc = xf86_config->crtc[0];
>
> The last hunk looks unrelated.
This was noted on IRC as well. It should have been amended into the
crtc_supports_gamma vs DRI1 fix, but wasn't.
--
Eric Anholt
eric at anholt.net eric.anholt at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20090202/efcfea92/attachment.pgp>
More information about the xorg
mailing list