From: Vinson Lee Date: Wed, 25 Nov 2009 05:28:56 +0000 (-0500) Subject: glu/sgi: Fix memory leak in gluBuild2DMipmapLevelsCore. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ea487c6d0b261bf90e898f51bc9f872de8166ddb;p=mesa.git glu/sgi: Fix memory leak in gluBuild2DMipmapLevelsCore. (cherry picked from commit 0d89f3dc7ff3f89ba8d5d664253730485bca35e2) --- diff --git a/src/glu/sgi/libutil/mipmap.c b/src/glu/sgi/libutil/mipmap.c index 22d702291f0..796be0aad38 100644 --- a/src/glu/sgi/libutil/mipmap.c +++ b/src/glu/sgi/libutil/mipmap.c @@ -4349,6 +4349,7 @@ static int gluBuild2DMipmapLevelsCore(GLenum target, GLint internalFormat, glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes); + free(srcImage); return GLU_OUT_OF_MEMORY; } }