From: Vinson Lee Date: Wed, 25 Nov 2009 05:18:49 +0000 (-0500) Subject: glu/sgi: Fix memory leak in gluBuild3DMipmapLevelsCore. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7b5eba453e08dfad151d09ba4d308cbdf4fc83af;p=mesa.git glu/sgi: Fix memory leak in gluBuild3DMipmapLevelsCore. (cherry picked from commit f895abbd9777c4985aa40cf660c68f6d7333f0ec) --- 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 */