summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2023-04-13 16:12:27 (GMT)
committerGitHub <noreply@github.com>2023-04-13 16:12:27 (GMT)
commite9604656ebbd969c84f17efc2236ddfbbbc9473c (patch)
tree86a798cb044bd51d67a24204555ac408758fb5d5
parent02c68739745887cd17b840a7e91d2ec9c9008bb1 (diff)
downloadhdf5-e9604656ebbd969c84f17efc2236ddfbbbc9473c.zip
hdf5-e9604656ebbd969c84f17efc2236ddfbbbc9473c.tar.gz
hdf5-e9604656ebbd969c84f17efc2236ddfbbbc9473c.tar.bz2
Fix #2598 sanitize leak (#2675)
-rw-r--r--release_docs/RELEASE.txt8
-rw-r--r--tools/lib/h5trav.c8
2 files changed, 10 insertions, 6 deletions
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index b90f9f6..81b1a94 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -270,7 +270,12 @@ Bug Fixes since HDF5-1.14.0 release
Tools
-----
- -
+ - In the tools traverse function - an error in either visit call
+ will bypass the cleanup of the local data variables.
+
+ Replaced the H5TOOLS_GOTO_ERROR with just H5TOOLS_ERROR.
+
+ (ADB - 2023/04/06 GH-2598)
Performance
@@ -282,7 +287,6 @@ Bug Fixes since HDF5-1.14.0 release
-----------
-
-
High-Level Library
------------------
-
diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c
index 599cb22..564dcba 100644
--- a/tools/lib/h5trav.c
+++ b/tools/lib/h5trav.c
@@ -144,9 +144,9 @@ trav_token_visited(hid_t loc_id, trav_addr_t *visited, H5O_token_t *token)
size_t u; /* Local index variable */
int token_cmp;
- /* Look for address */
+ /* Look for path associated with token */
for (u = 0; u < visited->nused; u++) {
- /* Check for address already in array */
+ /* Check for token already in array */
if (H5Otoken_cmp(loc_id, &visited->objs[u].token, token, &token_cmp) < 0)
return NULL;
if (!token_cmp)
@@ -281,13 +281,13 @@ traverse(hid_t file_id, const char *grp_name, hbool_t visit_start, hbool_t recur
/* Visit all links in group, recursively */
if (H5Lvisit_by_name2(file_id, grp_name, trav_index_by, trav_index_order, traverse_cb, &udata,
H5P_DEFAULT) < 0)
- H5TOOLS_GOTO_ERROR((-1), "H5Lvisit_by_name failed");
+ H5TOOLS_ERROR((-1), "H5Lvisit_by_name failed");
} /* end if */
else {
/* Iterate over links in group */
if (H5Literate_by_name2(file_id, grp_name, trav_index_by, trav_index_order, NULL, traverse_cb,
&udata, H5P_DEFAULT) < 0)
- H5TOOLS_GOTO_ERROR((-1), "H5Literate_by_name failed");
+ H5TOOLS_ERROR((-1), "H5Literate_by_name failed");
} /* end else */
/* Free visited addresses table */