[Mesa-dev] [PATCH] mesa: Fix memory leak in generate_mipmap_compressed.

Jose Fonseca jfonseca at vmware.com
Mon Mar 26 08:57:09 PDT 2012


Looks good.

Jose

----- Original Message -----
> Fixes Coverity resource leak defect.
> 
> NOTE: This is candidate for the 8.0 branch.
> 
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>  src/mesa/main/mipmap.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
> index 756316a..abd26b8 100644
> --- a/src/mesa/main/mipmap.c
> +++ b/src/mesa/main/mipmap.c
> @@ -2128,6 +2128,7 @@ generate_mipmap_compressed(struct gl_context
> *ctx, GLenum target,
>                                        dstWidth, dstHeight, dstDepth,
>                                        border,
>                                        srcImage->InternalFormat,
>                                        srcImage->TexFormat)) {
> +         free(temp_dst);
>           return;
>        }
>  
> --
> 1.7.9.1
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 


More information about the mesa-dev mailing list