From: Ian Romanick Date: Thu, 9 Sep 2010 00:13:00 +0000 (-0700) Subject: glsl2: Clear out profile pointers in _mesa_glsl_release_functions X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f69a6647fbd5e7cf4406fcc877ff78b507344073;p=mesa.git 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. --- diff --git a/src/glsl/builtin_function.cpp b/src/glsl/builtin_function.cpp index 0a2b0120f26..944265ca945 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 2431096a2b5..f96a5f7b8bb 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