mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
main: Destroy static hash table
format_array_format_table has a static lifetime - it will be destroyed by an atexit handler. Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
248161123c
commit
32b72cbca5
1 changed files with 8 additions and 0 deletions
|
|
@ -426,6 +426,12 @@ _mesa_format_to_array_format(mesa_format format)
|
|||
static struct hash_table *format_array_format_table;
|
||||
static once_flag format_array_format_table_exists = ONCE_FLAG_INIT;
|
||||
|
||||
static void
|
||||
format_array_format_table_destroy(void)
|
||||
{
|
||||
_mesa_hash_table_destroy(format_array_format_table, NULL);
|
||||
}
|
||||
|
||||
static bool
|
||||
array_formats_equal(const void *a, const void *b)
|
||||
{
|
||||
|
|
@ -471,6 +477,8 @@ format_array_format_table_init(void)
|
|||
(void *)(intptr_t)array_format,
|
||||
(void *)(intptr_t)f);
|
||||
}
|
||||
|
||||
atexit(format_array_format_table_destroy);
|
||||
}
|
||||
|
||||
mesa_format
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue