From eca8d5b767b40df359e7654fc92f00c516947f7f Mon Sep 17 00:00:00 2001 From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Sun, 3 Oct 2021 08:06:08 -0500 Subject: Fix ASAN issue in h5dump error path (#1051) * Fix ASAN issue in h5dump error path * Rework error allocation free. --- tools/lib/h5tools_utils.c | 1 + tools/src/h5dump/h5dump.c | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index f2407bf..ea9812b 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -450,6 +450,7 @@ free_table(table_t *table) HDfree(table->objs[u].objname); HDfree(table->objs); + HDfree(table); } #ifdef H5DUMP_DEBUG diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c index e6d1de3..23498bd 100644 --- a/tools/src/h5dump/h5dump.c +++ b/tools/src/h5dump/h5dump.c @@ -465,11 +465,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 */ -- cgit v0.12