summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2019-01-28 06:23:27 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2019-01-28 06:23:27 (GMT)
commit611ecb5db4051cbf762cc24944ee75ea5284c5d2 (patch)
tree57149b4c5dd277774eb2f2a20b03d77cf8859702 /tools
parent01baff97f6f2f358b9361d9b84590074ea5f3127 (diff)
parent2880ef43eb03526e7d75551720547b85e66a3086 (diff)
downloadhdf5-611ecb5db4051cbf762cc24944ee75ea5284c5d2.zip
hdf5-611ecb5db4051cbf762cc24944ee75ea5284c5d2.tar.gz
hdf5-611ecb5db4051cbf762cc24944ee75ea5284c5d2.tar.bz2
Merge pull request #1480 in HDFFV/hdf5 from ~BMRIBLER/hdf5_1_10_bmr:hdf5_1_10 to hdf5_1_10
* commit '2880ef43eb03526e7d75551720547b85e66a3086': Fixed HDFFV-10578
Diffstat (limited to 'tools')
-rw-r--r--tools/lib/h5tools_utils.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c
index 8ac0d32..e7e017f 100644
--- a/tools/lib/h5tools_utils.c
+++ b/tools/lib/h5tools_utils.c
@@ -561,6 +561,8 @@ herr_t
init_objs(hid_t fid, find_objs_t *info, table_t **group_table,
table_t **dset_table, table_t **type_table)
{
+ herr_t ret_value = SUCCEED;
+
/* Initialize the tables */
init_table(group_table);
init_table(dset_table);
@@ -573,7 +575,20 @@ init_objs(hid_t fid, find_objs_t *info, table_t **group_table,
info->dset_table = *dset_table;
/* Find all shared objects */
- return(h5trav_visit(fid, "/", TRUE, TRUE, find_objs_cb, NULL, info, H5O_INFO_BASIC));
+ if((ret_value = h5trav_visit(fid, "/", TRUE, TRUE, find_objs_cb, NULL, info, H5O_INFO_BASIC)) < 0)
+ HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "finding shared objects failed")
+
+done:
+ /* Release resources */
+ if(ret_value < 0) {
+ free_table(*group_table);
+ info->group_table = NULL;
+ free_table(*type_table);
+ info->type_table = NULL;
+ free_table(*dset_table);
+ info->dset_table = NULL;
+ }
+ return ret_value;
}