From: Brian Paul Date: Sun, 14 Feb 2010 17:02:42 +0000 (-0700) Subject: src/glu/mesa: fix mem leak (bug 26559) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2523172a5e9b60a1075ed0b67b9c6935d8feeeb7;p=mesa.git src/glu/mesa: fix mem leak (bug 26559) --- diff --git a/src/glu/mesa/mipmap.c b/src/glu/mesa/mipmap.c index d85ce9b9b0a..ad6b6e63a62 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; } }