diff options
author | Eric Anholt <eric@anholt.net> | 2012-01-12 13:08:22 -0800 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2012-01-24 15:39:47 -0800 |
commit | bffefc3d27c74dc25987405c6f94d7bc7f67acf6 (patch) | |
tree | 926dd7d00114e68c712c5ba0088861801938a09b | |
parent | 531948947e39225d42967521a4bb479f6be5ab72 (diff) |
mesa: Fix leak of uniform storage records on shader program link/free.
NOTE: This is a candidate for the 8.0 branch.
(cherry picked from commit 0f68d88034a9815445ae0a35aacc500f82f33a18)
-rw-r--r-- | src/mesa/main/shaderobj.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c index de66851e9c9..36f208d6c09 100644 --- a/src/mesa/main/shaderobj.c +++ b/src/mesa/main/shaderobj.c @@ -35,6 +35,7 @@ #include "main/mfeatures.h" #include "main/mtypes.h" #include "main/shaderobj.h" +#include "main/uniforms.h" #include "program/program.h" #include "program/prog_parameter.h" #include "program/hash_table.h" @@ -276,6 +277,7 @@ _mesa_clear_shader_program_data(struct gl_context *ctx, struct gl_shader_program *shProg) { if (shProg->UniformStorage) { + _mesa_uniform_detach_all_driver_storage(shProg->UniformStorage); ralloc_free(shProg->UniformStorage); shProg->NumUserUniformStorage = 0; shProg->UniformStorage = NULL; |