From: Grazvydas Ignotas Date: Tue, 2 May 2017 18:06:50 +0000 (+0300) Subject: glsl: destroy function and subroutine hash tables X-Git-Tag: upstream/18.1.0~10011 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1f743a0edff14a338ca53b6c60c3b5d5c85c29d5;p=platform%2Fupstream%2Fmesa.git glsl: destroy function and subroutine hash tables Just like other type hash tables are destroyed in _mesa_glsl_release_types(), also destroy the ones for function and subroutine types. Signed-off-by: Grazvydas Ignotas Reviewed-by: Timothy Arceri --- diff --git a/src/compiler/glsl_types.cpp b/src/compiler/glsl_types.cpp index 00a95d4..3930029 100644 --- a/src/compiler/glsl_types.cpp +++ b/src/compiler/glsl_types.cpp @@ -412,6 +412,16 @@ _mesa_glsl_release_types(void) glsl_type::interface_types = NULL; } + if (glsl_type::function_types != NULL) { + _mesa_hash_table_destroy(glsl_type::function_types, NULL); + glsl_type::function_types = NULL; + } + + if (glsl_type::subroutine_types != NULL) { + _mesa_hash_table_destroy(glsl_type::subroutine_types, NULL); + glsl_type::subroutine_types = NULL; + } + ralloc_free(glsl_type::mem_ctx); glsl_type::mem_ctx = NULL; }