Fix ASAN issue in h5dump error path (#1051)

* Fix ASAN issue in h5dump error path

* Rework error allocation free.
This commit is contained in:
Allen Byrne 2021-10-03 08:06:08 -05:00 committed by GitHub
parent b3cb56e255
commit eca8d5b767
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 3 deletions

View File

@ -450,6 +450,7 @@ free_table(table_t *table)
HDfree(table->objs[u].objname); HDfree(table->objs[u].objname);
HDfree(table->objs); HDfree(table->objs);
HDfree(table);
} }
#ifdef H5DUMP_DEBUG #ifdef H5DUMP_DEBUG

View File

@ -465,11 +465,8 @@ table_list_free(void)
/* Free each table */ /* Free each table */
free_table(table_list.tables[u].group_table); free_table(table_list.tables[u].group_table);
HDfree(table_list.tables[u].group_table);
free_table(table_list.tables[u].dset_table); free_table(table_list.tables[u].dset_table);
HDfree(table_list.tables[u].dset_table);
free_table(table_list.tables[u].type_table); free_table(table_list.tables[u].type_table);
HDfree(table_list.tables[u].type_table);
} }
/* Free the table list */ /* Free the table list */