summaryrefslogtreecommitdiff
path: root/src/glu/sgi
diff options
context:
space:
mode:
authorVinson Lee <vlee@vmware.com>2009-11-23 00:57:37 -0500
committerVinson Lee <vlee@vmware.com>2009-12-04 00:10:22 -0800
commit6c1fc2b2a5c80697dff304562e79dae25d9f2cb1 (patch)
treed5a2fd1d857b67d84b99d4e74f91e2b70eeab4e3 /src/glu/sgi
parentfe38c16021694145b2c96818e0c0fb095e42c03b (diff)
glu/sgi: Fix memory leak in gluScaleImage3D.
(cherry picked from commit b611f639b4bffdcca376293f7ce71af9f6bdbff3)
Diffstat (limited to 'src/glu/sgi')
-rw-r--r--src/glu/sgi/libutil/mipmap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glu/sgi/libutil/mipmap.c b/src/glu/sgi/libutil/mipmap.c
index 4139c304a1..223621f49f 100644
--- a/src/glu/sgi/libutil/mipmap.c
+++ b/src/glu/sgi/libutil/mipmap.c
@@ -7384,6 +7384,8 @@ int gluScaleImage3D(GLenum format,
afterImage = malloc(imageSize3D(widthOut, heightOut, depthOut, format,
GL_UNSIGNED_SHORT));
if (beforeImage == NULL || afterImage == NULL) {
+ free(beforeImage);
+ free(afterImage);
return GLU_OUT_OF_MEMORY;
}
retrieveStoreModes3D(&psm);