On Wed, Dec 14, 2011 at 15:55:22 +0000, Chris Wilson wrote:

> All the callers were already checking for failure, except that
> createSourcePicture() itself was failing to check whether it
> successfully allocated the Picture.
> 
> Signed-off-by: Chris Wilson <[email protected]>
> ---
>  render/picture.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/render/picture.c b/render/picture.c
> index f134596..165ceac 100644
> --- a/render/picture.c
> +++ b/render/picture.c
> @@ -848,7 +848,11 @@ static void initGradient(SourcePictPtr pGradient, int 
> stopCount,
>  static PicturePtr createSourcePicture(void)
>  {
>      PicturePtr pPicture;
> +
>      pPicture = dixAllocateObjectWithPrivates(PictureRec, PRIVATE_PICTURE);
> +    if (!pPicture)
> +     return 0;
> +

make that return NULL?

Cheers,
Julien

>      pPicture->pDrawable = 0;
>      pPicture->pFormat = 0;
>      pPicture->pNext = 0;
> -- 
> 1.7.7.3
> 
> _______________________________________________
> [email protected]: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
> 
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to