mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-13 16:47:58 +08:00
Refixed HDFFV-10578
Description: Applied Neil's fix for this issue after removing previous attempt. The resources are now released in init_objs() when failure occurs there. Neil will fix HDFFV-10676 separately. Platforms tested: Linux/64 (jelly) Linux/64 (platypus) Darwin (osx1010test)
This commit is contained in:
parent
6c7462b1a9
commit
78d0564c2a
@ -1548,7 +1548,7 @@ done:
|
|||||||
*
|
*
|
||||||
* Purpose: Given source and destination buffers in memory (SRC & DST)
|
* Purpose: Given source and destination buffers in memory (SRC & DST)
|
||||||
* copy sequences of from the source buffer into the destination
|
* copy sequences of from the source buffer into the destination
|
||||||
* buffer. Each set of sequnces has an array of lengths, an
|
* buffer. Each set of sequences has an array of lengths, an
|
||||||
* array of offsets, the maximum number of sequences and the
|
* array of offsets, the maximum number of sequences and the
|
||||||
* current sequence to start at in the sequence.
|
* current sequence to start at in the sequence.
|
||||||
*
|
*
|
||||||
|
@ -561,6 +561,8 @@ herr_t
|
|||||||
init_objs(hid_t fid, find_objs_t *info, table_t **group_table,
|
init_objs(hid_t fid, find_objs_t *info, table_t **group_table,
|
||||||
table_t **dset_table, table_t **type_table)
|
table_t **dset_table, table_t **type_table)
|
||||||
{
|
{
|
||||||
|
herr_t ret_value = SUCCEED;
|
||||||
|
|
||||||
/* Initialize the tables */
|
/* Initialize the tables */
|
||||||
init_table(group_table);
|
init_table(group_table);
|
||||||
init_table(dset_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;
|
info->dset_table = *dset_table;
|
||||||
|
|
||||||
/* Find all shared objects */
|
/* 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 == FAIL) {
|
||||||
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user