[PATCH] exa: check for NULL pointer before dereferences it

Michel Dänzer michel at daenzer.net
Fri Apr 16 09:24:25 PDT 2010


On Fre, 2010-04-16 at 18:42 +0300, Tiago Vignatti wrote: 
> Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>

[...]

> diff --git a/exa/exa_driver.c b/exa/exa_driver.c
> index dcf1a98..25254c9 100644
> --- a/exa/exa_driver.c
> +++ b/exa/exa_driver.c
> @@ -134,6 +134,8 @@ exaModifyPixmapHeader_driver(PixmapPtr pPixmap, int width, int height, int depth
>      if (!pPixmap)
>          return FALSE;
>  
> +    pScreen = pPixmap->drawable.pScreen;
> +
>      pExaScr = ExaGetScreenPriv(pScreen);
>      pExaPixmap = ExaGetPixmapPriv(pPixmap);

Don't add an empty line here.

Other than that,

Acked-by: Michel Dänzer <michel at daenzer.net>


-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer


More information about the xorg-devel mailing list