Fix memory leak in _tnl_UpdateFixedFunctionProgram
authorShunichi Fuji <palglowr@gmail.com>
Fri, 16 May 2008 20:18:06 +0000 (13:18 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 16 May 2008 20:18:25 +0000 (13:18 -0700)
src/mesa/tnl/t_vp_build.c

index 2b1eefe80988563991c74f894ac3019c7605062e..4a0ce447c6b6a7d653f077648aa3ac3612a5b30c 100644 (file)
@@ -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);