summaryrefslogtreecommitdiffstats
path: root/src/glu/sgi
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2009-11-22 01:57:35 -0500
committerVinson Lee <[email protected]>2009-11-22 01:57:35 -0500
commita9c540f5dedbf593f8038fdbc95eecb60826ab26 (patch)
treed678f94f0b9c15bc02144676c73f9d8dfac732ac /src/glu/sgi
parentd3b4c99c703f70a9d0e715a97e52672f7f8fc980 (diff)
glu/sgi: Fix memory leak in gluScaleImage.
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 af647af73c9..4139c304a1d 100644
--- a/src/glu/sgi/libutil/mipmap.c
+++ b/src/glu/sgi/libutil/mipmap.c
@@ -3526,6 +3526,8 @@ gluScaleImage(GLenum format, GLsizei widthin, GLsizei heightin,
afterImage =
malloc(image_size(widthout, heightout, format, GL_UNSIGNED_SHORT));
if (beforeImage == NULL || afterImage == NULL) {
+ free(beforeImage);
+ free(afterImage);
return GLU_OUT_OF_MEMORY;
}