From 94a4eb1e7806bfcb52f6cd48f8071238da7e2cf8 Mon Sep 17 00:00:00 2001 From: Vladimir Dergachev Date: Sat, 6 Aug 2005 05:19:42 +0000 Subject: Follow suggestion by Aapo Tahkola to fix giant memory leak from forgetting to free the key when entry was already found (presumably a common case). --- src/mesa/main/texenvprogram.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa/main') diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c index f18ae041f3..4cb97469a5 100644 --- a/src/mesa/main/texenvprogram.c +++ b/src/mesa/main/texenvprogram.c @@ -1145,6 +1145,7 @@ void _mesa_UpdateTexEnvProgram( GLcontext *ctx ) cache_item(&ctx->Texture.env_fp_cache, hash, key, ctx->_TexEnvProgram); } else { + FREE(key); if (0) _mesa_printf("Found existing texenv program for key %x\n", hash); } -- cgit v1.2.3