Follow suggestion by Aapo Tahkola to fix giant memory leak from forgetting to free...
authorVladimir Dergachev <volodya@freedesktop.org>
Sat, 6 Aug 2005 05:19:42 +0000 (05:19 +0000)
committerVladimir Dergachev <volodya@freedesktop.org>
Sat, 6 Aug 2005 05:19:42 +0000 (05:19 +0000)
src/mesa/main/texenvprogram.c
src/mesa/tnl/t_vp_build.c

index f18ae041f3c8d31296a1dd8c503ff3bf5f65eadc..4cb97469a58a9e4b61cadae26c34a3c7efb3f565 100644 (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);
    }
        
index 049bd20bd9ddabc88da117e3621f9f7163ce07c1..e62c5b374c26da56e516954c1df352c337a8aea9 100644 (file)
@@ -1473,6 +1473,7 @@ void _tnl_UpdateFixedFunctionProgram( GLcontext *ctx )
       cache_item(&tnl->vp_cache, hash, key, ctx->_TnlProgram );
    }
    else {
+      FREE(key);
       if (0) 
         _mesa_printf("Found existing TNL program for key %x\n", hash);
    }