From 2523172a5e9b60a1075ed0b67b9c6935d8feeeb7 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sun, 14 Feb 2010 10:02:42 -0700 Subject: src/glu/mesa: fix mem leak (bug 26559) --- src/glu/mesa/mipmap.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/glu') diff --git a/src/glu/mesa/mipmap.c b/src/glu/mesa/mipmap.c index d85ce9b9b0..ad6b6e63a6 100644 --- a/src/glu/mesa/mipmap.c +++ b/src/glu/mesa/mipmap.c @@ -287,7 +287,11 @@ gluScaleImage(GLenum format, } break; default: - return GLU_INVALID_ENUM; + { + free(tempin); + free(tempout); + return GLU_INVALID_ENUM; + } } @@ -670,6 +674,7 @@ gluBuild1DMipmaps(GLenum target, GLint components, break; default: /* Not implemented */ + free(texture); return GLU_ERROR; } } -- cgit v1.2.3