From c74afe0c46dbd0f90361c06526f70885a9061e8e Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 26 Nov 2009 00:35:31 -0500 Subject: [PATCH] glu/sgi: Fix memory leak in gluBuild2DMipmapLevelsCore. (cherry picked from commit 808f0376607b0e2d31dfebc888fd8f1e737fed09) --- src/glu/sgi/libutil/mipmap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/glu/sgi/libutil/mipmap.c b/src/glu/sgi/libutil/mipmap.c index bf6eaf88c6d..d1fd5a7d724 100644 --- a/src/glu/sgi/libutil/mipmap.c +++ b/src/glu/sgi/libutil/mipmap.c @@ -4108,6 +4108,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; } /* level userLevel+1 is in srcImage; level userLevel already saved */ -- 2.30.2