From: Eric Anholt Date: Wed, 18 Aug 2010 21:12:52 +0000 (-0700) Subject: mesa: Free linked shaders when deleting the shader program. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=56a0690a81cd6a0e7db4c041430ca38e5063e145;p=mesa.git mesa: Free linked shaders when deleting the shader program. --- 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; }