Skip to content

Commit

Permalink
Fix ASAN issue in h5dump error path (#1051)
Browse files Browse the repository at this point in the history
* Fix ASAN issue in h5dump error path

* Rework error allocation free.
  • Loading branch information
byrnHDF authored Oct 3, 2021
1 parent b3cb56e commit eca8d5b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions tools/lib/h5tools_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ free_table(table_t *table)
HDfree(table->objs[u].objname);

HDfree(table->objs);
HDfree(table);
}

#ifdef H5DUMP_DEBUG
Expand Down
3 changes: 0 additions & 3 deletions tools/src/h5dump/h5dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit eca8d5b

Please sign in to comment.