[PATCH] glx: fixup deref of null pointer when glx screen init fails.

Ian Romanick idr at freedesktop.org
Thu Oct 1 10:50:09 PDT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dave Airlie wrote:
> From: Dave Airlie <airlied at linux.ie>
> 
> I think this is what the original author wanted.
> 
> Signed-off-by: Dave Airlie <airlied at redhat.com>

Acked-by: Ian Romanick <ian.d.romanick at intel.com>

I can't believe this got by Jesse and Kristian when they reviewed the
original patch.  I need to go clean the egg off my face...

> ---
>  glx/glxext.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/glx/glxext.c b/glx/glxext.c
> index 2de8b84..0737420 100644
> --- a/glx/glxext.c
> +++ b/glx/glxext.c
> @@ -364,14 +364,14 @@ void GlxExtensionInit(void)
>  
>  	    glxScreen = p->screenProbe(pScreen);
>  	    if (glxScreen != NULL) {
> +	    	if (glxScreen->GLXminor < glxMinorVersion)
> +		    glxMinorVersion = glxScreen->GLXminor;
>  		LogMessage(X_INFO,
>  			   "GLX: Initialized %s GL provider for screen %d\n",
>  			   p->name, i);
>  		break;
>  	    }
>  
> -	    if (glxScreen->GLXminor < glxMinorVersion)
> -		glxMinorVersion = glxScreen->GLXminor;
>  	}
>  
>  	if (!p)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrE688ACgkQX1gOwKyEAw/9GACggmInLQQGyMeCvO6DVntGQCHZ
PSEAn023uZgcbprhD7AUlIh9jtqsdnJK
=fgc9
-----END PGP SIGNATURE-----


More information about the xorg-devel mailing list