diff options
author | Vinson Lee <vlee@vmware.com> | 2009-11-22 01:57:35 -0500 |
---|---|---|
committer | Vinson Lee <vlee@vmware.com> | 2009-12-04 00:09:22 -0800 |
commit | fe38c16021694145b2c96818e0c0fb095e42c03b (patch) | |
tree | ac2d950a75b613c526dbc415b53250565e28799f /src | |
parent | d23bb22f6258a4b55af42fdb3f29fec2e694df72 (diff) |
glu/sgi: Fix memory leak in gluScaleImage.
(cherry picked from commit a9c540f5dedbf593f8038fdbc95eecb60826ab26)
Diffstat (limited to 'src')
-rw-r--r-- | src/glu/sgi/libutil/mipmap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glu/sgi/libutil/mipmap.c b/src/glu/sgi/libutil/mipmap.c index af647af73c..4139c304a1 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; } |