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).

This commit is contained in:
Vladimir Dergachev
2005-08-06 05:19:42 +00:00
parent b8731903df
commit 94a4eb1e78
2 changed files with 2 additions and 0 deletions

View File

@@ -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);
}