[Mesa-dev] [PATCH] swrast: Fix memory leak in out-of-memory path.

Brian Paul brianp at vmware.com
Tue Oct 25 10:32:00 PDT 2011


On 10/25/2011 11:12 AM, Vinson Lee wrote:
> Fixes Coverity resource leak defect.
> ---
>   src/mesa/swrast/s_texcombine.c |    1 +
>   1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/src/mesa/swrast/s_texcombine.c b/src/mesa/swrast/s_texcombine.c
> index c67c356..a7cbb44 100644
> --- a/src/mesa/swrast/s_texcombine.c
> +++ b/src/mesa/swrast/s_texcombine.c
> @@ -108,6 +108,7 @@ texture_combine( struct gl_context *ctx, GLuint unit, GLuint n,
>               i--;
>            }
>            _mesa_error(ctx, GL_OUT_OF_MEMORY, "texture_combine");
> +         free(rgba);
>            return;
>         }
>      }

Reviewed-by: Brian Paul <brianp at vmware.com>


More information about the mesa-dev mailing list