summaryrefslogtreecommitdiffstats
path: root/src/glu/sgi/libutil/mipmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glu/sgi/libutil/mipmap.c')
-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;
}