diff options
author | Kenneth Graunke <[email protected]> | 2013-09-16 23:35:41 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2013-09-19 10:52:58 -0700 |
commit | d2d90d66d81d5f147b03628e1913bf7f9d2a0563 (patch) | |
tree | 126b0302bc19fbe3b1f819aaeb2dc4dcb4f7dcd7 /src/glsl/builtin_functions.cpp | |
parent | 9f64bb2312dece0bba02bcbaf0c48d27d2f69daf (diff) |
glsl: Delete builtin_builder::shader when destroying built-ins.
I would use _mesa_delete_shader, but it's declared static, and we don't
really need any of the stuff in it anyway.
This fixes a memory leak caught by Valgrind.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/glsl/builtin_functions.cpp')
-rw-r--r-- | src/glsl/builtin_functions.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functions.cpp index 31f7489d18f..96358a7373d 100644 --- a/src/glsl/builtin_functions.cpp +++ b/src/glsl/builtin_functions.cpp @@ -580,6 +580,9 @@ builtin_builder::release() { ralloc_free(mem_ctx); mem_ctx = NULL; + + ralloc_free(shader); + shader = NULL; } void |