diff options
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/glsl_types.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/glsl/glsl_types.cpp b/src/glsl/glsl_types.cpp index 518abc959d..c488f5c271 100644 --- a/src/glsl/glsl_types.cpp +++ b/src/glsl/glsl_types.cpp @@ -41,7 +41,7 @@ void glsl_type::init_talloc_type_ctx(void) { if (glsl_type::mem_ctx == NULL) { - glsl_type::mem_ctx = talloc_init("glsl_type"); + glsl_type::mem_ctx = talloc_autofree_context(); assert(glsl_type::mem_ctx != NULL); } } @@ -230,11 +230,6 @@ _mesa_glsl_release_types(void) hash_table_dtor(glsl_type::record_types); glsl_type::record_types = NULL; } - - if (glsl_type::mem_ctx != NULL) { - talloc_free(glsl_type::mem_ctx); - glsl_type::mem_ctx = NULL; - } } |