Mesa (master): mesa: fix potential mem leak in generate_mipmap_compressed()
Brian Paul
brianp at kemper.freedesktop.org
Fri Dec 2 14:52:47 UTC 2011
Module: Mesa
Branch: master
Commit: 9ec5050898877baa6120fd9a04464651c7cb28ad
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9ec5050898877baa6120fd9a04464651c7cb28ad
Author: Brian Paul <brianp at vmware.com>
Date: Thu Dec 1 16:37:49 2011 -0700
mesa: fix potential mem leak in generate_mipmap_compressed()
Fixes a coverity warning.
Reviewed-by: Vinson Lee <vlee at vmware.com>
---
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 c621800..fd6e582 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;
}
More information about the mesa-commit
mailing list