summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-09-08 17:13:00 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-09-08 17:16:49 -0700
commitf69a6647fbd5e7cf4406fcc877ff78b507344073 (patch)
tree0e6dfa1269a80d8f6371004015f15f05791aa585 /src
parentde1ffd2f62257c174325d877c327d56b1a9e6cbc (diff)
glsl2: Clear out profile pointers in _mesa_glsl_release_functions
Otherwise builtin_profiles contains dangling pointers the next time _mesa_read_profile is called. I suspect this may fix bugzilla #29847, but I was never able to reproduce it.
Diffstat (limited to 'src')
-rw-r--r--src/glsl/builtin_function.cpp1
-rwxr-xr-xsrc/glsl/builtins/tools/generate_builtins.py1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/glsl/builtin_function.cpp b/src/glsl/builtin_function.cpp
index 0a2b0120f2..944265ca94 100644
--- a/src/glsl/builtin_function.cpp
+++ b/src/glsl/builtin_function.cpp
@@ -19143,6 +19143,7 @@ _mesa_glsl_release_functions(void)
{
talloc_free(builtin_mem_ctx);
builtin_mem_ctx = NULL;
+ memset(builtin_profiles, 0, sizeof(builtin_profiles));
}
static void
diff --git a/src/glsl/builtins/tools/generate_builtins.py b/src/glsl/builtins/tools/generate_builtins.py
index 2431096a2b..f96a5f7b8b 100755
--- a/src/glsl/builtins/tools/generate_builtins.py
+++ b/src/glsl/builtins/tools/generate_builtins.py
@@ -182,6 +182,7 @@ _mesa_glsl_release_functions(void)
{
talloc_free(builtin_mem_ctx);
builtin_mem_ctx = NULL;
+ memset(builtin_profiles, 0, sizeof(builtin_profiles));
}
static void