summaryrefslogtreecommitdiff
path: root/src/glu/sgi
diff options
context:
space:
mode:
authorVinson Lee <vlee@vmware.com>2009-11-26 00:35:31 -0500
committerVinson Lee <vlee@vmware.com>2009-11-26 00:35:31 -0500
commit808f0376607b0e2d31dfebc888fd8f1e737fed09 (patch)
treec49d50ec2130c54e32f3185da9178085b92fa727 /src/glu/sgi
parent45d9ea361981520a7c5df3ef1e10b76fac14bf02 (diff)
glu/sgi: Fix memory leak in gluBuild2DMipmapLevelsCore.
Diffstat (limited to 'src/glu/sgi')
-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 bf6eaf88c6..d1fd5a7d72 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 */