OSDN Git Service

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 f18ae04..4cb9746 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 049bd20..e62c5b3 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);
    }