Mesa (master): src/glu/mesa: fix mem leak (bug 26559)
Brian Paul
brianp at kemper.freedesktop.org
Sun Feb 14 17:06:32 UTC 2010
Module: Mesa
Branch: master
Commit: 2523172a5e9b60a1075ed0b67b9c6935d8feeeb7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2523172a5e9b60a1075ed0b67b9c6935d8feeeb7
Author: Brian Paul <brianp at vmware.com>
Date: Sun Feb 14 10:02:42 2010 -0700
src/glu/mesa: fix mem leak (bug 26559)
---
src/glu/mesa/mipmap.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/glu/mesa/mipmap.c b/src/glu/mesa/mipmap.c
index d85ce9b..ad6b6e6 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;
}
}
More information about the mesa-commit
mailing list