mesa: Fix memory leak in generate_mipmap_compressed.
authorVinson Lee <vlee@freedesktop.org>
Sat, 24 Mar 2012 06:11:09 +0000 (23:11 -0700)
committerVinson Lee <vlee@freedesktop.org>
Mon, 26 Mar 2012 21:08:11 +0000 (14:08 -0700)
Fixes Coverity resource leak defect.

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/mipmap.c

index 756316a820fd3c0b750af0e2921c7ea711f9852f..abd26b8d3c861913fb44b8d8f93d3bed69d91289 100644 (file)
@@ -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;
       }