From: Shunichi Fuji Date: Fri, 16 May 2008 20:18:06 +0000 (-0700) Subject: Fix memory leak in _tnl_UpdateFixedFunctionProgram X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e6cd9d88d345b998f8623f0f92c3c4cea8e66f54;p=mesa.git Fix memory leak in _tnl_UpdateFixedFunctionProgram --- 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);