summaryrefslogtreecommitdiff
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
commitb010f779834f743b6332825e975117ac7995ab16 (patch)
tree41c79c5b2ac03c207f4ba49bc7eddc4d6b26c065
parentf7e0b88aa37fb2cea91ac15ada252549748ca65d (diff)
downloadglu-b010f779834f743b6332825e975117ac7995ab16.tar.gz
glu/sgi: Fix memory leak in gluScaleImage3D.
(cherry picked from commit b611f639b4bffdcca376293f7ce71af9f6bdbff3)
-rw-r--r--src/libutil/mipmap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libutil/mipmap.c b/src/libutil/mipmap.c
index 4139c30..223621f 100644
--- a/src/libutil/mipmap.c
+++ b/src/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);