From 9ec5050898877baa6120fd9a04464651c7cb28ad Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 1 Dec 2011 16:37:49 -0700 Subject: [PATCH] mesa: fix potential mem leak in generate_mipmap_compressed() Fixes a coverity warning. Reviewed-by: Vinson Lee --- src/mesa/main/mipmap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c index c621800c0fa..fd6e582ec92 100644 --- a/src/mesa/main/mipmap.c +++ b/src/mesa/main/mipmap.c @@ -2048,6 +2048,7 @@ generate_mipmap_compressed(struct gl_context *ctx, GLenum target, dstImage = _mesa_get_tex_image(ctx, texObj, target, level + 1); if (!dstImage) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "generating mipmaps"); + free(temp_dst); return; } -- 2.30.2