From ed69b1174a5ec875ae6a8e2cd05fbbcc8153d181 Mon Sep 17 00:00:00 2001 From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Fri, 8 Oct 2021 16:51:28 -0500 Subject: 1.8 Merge Fix ASAN issue in h5dump error path #1051 (#1061) * Merge Fix ASAN issue in h5dump error path #1051 * Merge Rework error allocation free. --- tools/h5dump/h5dump.c | 3 --- tools/lib/h5tools_utils.c | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index d9906d5..8638c08 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -510,11 +510,8 @@ table_list_free(void) /* Free each table */ free_table(table_list.tables[u].group_table); - HDfree(table_list.tables[u].group_table); free_table(table_list.tables[u].dset_table); - HDfree(table_list.tables[u].dset_table); free_table(table_list.tables[u].type_table); - HDfree(table_list.tables[u].type_table); } /* Free the table list */ diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index 4629736..e066416 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -614,6 +614,7 @@ free_table(table_t *table) HDfree(table->objs[u].objname); HDfree(table->objs); + HDfree(table); } #ifdef H5DUMP_DEBUG -- cgit v0.12