summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinson Lee <vlee@vmware.com>2009-11-25 00:18:49 -0500
committerVinson Lee <vlee@vmware.com>2009-12-04 00:12:49 -0800
commit7b5eba453e08dfad151d09ba4d308cbdf4fc83af (patch)
tree46ac8dfaaed1804bd41ef249661b10e2ebbca17b
parent7ed749c062c2bc2b048a34f8e4c6b0a5198e32bb (diff)
glu/sgi: Fix memory leak in gluBuild3DMipmapLevelsCore.
(cherry picked from commit f895abbd9777c4985aa40cf660c68f6d7333f0ec)
-rw-r--r--src/glu/sgi/libutil/mipmap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/glu/sgi/libutil/mipmap.c b/src/glu/sgi/libutil/mipmap.c
index a5d07a59cf7..22d702291f0 100644
--- a/src/glu/sgi/libutil/mipmap.c
+++ b/src/glu/sgi/libutil/mipmap.c
@@ -8098,6 +8098,7 @@ static int gluBuild3DMipmapLevelsCore(GLenum target, GLint internalFormat,
glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes);
glPixelStorei(GL_UNPACK_SKIP_IMAGES, psm.unpack_skip_images);
glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, psm.unpack_image_height);
+ free(srcImage);
return GLU_OUT_OF_MEMORY;
}
/* level userLevel+1 is in srcImage; level userLevel already saved */