From e6cd9d88d345b998f8623f0f92c3c4cea8e66f54 Mon Sep 17 00:00:00 2001 From: Shunichi Fuji Date: Fri, 16 May 2008 13:18:06 -0700 Subject: [PATCH] Fix memory leak in _tnl_UpdateFixedFunctionProgram --- src/mesa/tnl/t_vp_build.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/tnl/t_vp_build.c b/src/mesa/tnl/t_vp_build.c index 2b1eefe8098..4a0ce447c6b 100644 --- a/src/mesa/tnl/t_vp_build.c +++ b/src/mesa/tnl/t_vp_build.c @@ -1572,6 +1572,8 @@ void _tnl_UpdateFixedFunctionProgram( GLcontext *ctx ) cache_item(ctx, tnl->vp_cache, hash, key, newProg); _mesa_reference_vertprog(ctx, &ctx->VertexProgram._TnlProgram, newProg); + } else { + FREE(key); } _mesa_reference_vertprog(ctx, &ctx->VertexProgram._TnlProgram, newProg); -- 2.30.2