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

Vinson Lee vlee at freedesktop.org
Fri Mar 23 23:16:37 PDT 2012


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



More information about the mesa-dev mailing list