From 56a0690a81cd6a0e7db4c041430ca38e5063e145 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 18 Aug 2010 14:12:52 -0700 Subject: [PATCH] mesa: Free linked shaders when deleting the shader program. --- src/mesa/main/shaderobj.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c index 863d50fbe55..1755e8a33c7 100644 --- a/src/mesa/main/shaderobj.c +++ b/src/mesa/main/shaderobj.c @@ -314,6 +314,12 @@ _mesa_free_shader_program_data(GLcontext *ctx, free(shProg->TransformFeedback.VaryingNames); shProg->TransformFeedback.VaryingNames = NULL; shProg->TransformFeedback.NumVarying = 0; + + + for (i = 0; i < shProg->_NumLinkedShaders; i++) { + ctx->Driver.DeleteShader(ctx, shProg->_LinkedShaders[i]); + } + shProg->_NumLinkedShaders = 0; } -- 2.30.2