summaryrefslogtreecommitdiffstats
path: root/src/glu
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2009-11-23 00:57:37 -0500
committerVinson Lee <[email protected]>2009-11-23 00:57:37 -0500
commitb611f639b4bffdcca376293f7ce71af9f6bdbff3 (patch)
tree52b4a0bc219ce308d2a87a1b4bbae91e6fec3424 /src/glu
parente0fda040135490fdd54e57000c7995e27dc70657 (diff)
glu/sgi: Fix memory leak in gluScaleImage3D.
Diffstat (limited to 'src/glu')
-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 4139c304a1d..223621f49fc 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);