diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2015-06-03 18:00:58 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2015-06-03 18:00:58 (GMT) |
commit | 5d12a79db20305b7c08e505a683a4c1e38e9039a (patch) | |
tree | d033bb9898996b35d679bbec64da056d0bd1a444 /src/H5Pdcpl.c | |
parent | 9a8c664ff0d9884b8ce2bde543685245cb73f6bb (diff) | |
download | hdf5-5d12a79db20305b7c08e505a683a4c1e38e9039a.zip hdf5-5d12a79db20305b7c08e505a683a4c1e38e9039a.tar.gz hdf5-5d12a79db20305b7c08e505a683a4c1e38e9039a.tar.bz2 |
[svn-r27145] Add some testing for printf-style source dataset name resolution.
Various bug fixes, including a temporary fix for printf with FIRST_MISSING view.
Other cleanup.
Tested: ummon
Diffstat (limited to 'src/H5Pdcpl.c')
-rw-r--r-- | src/H5Pdcpl.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index e647f29..ff7098d 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -1724,22 +1724,22 @@ done: /* Check if the entry has been partly allocated but not added to the * property list or not included in list_nused */ - if((ret_value < 0) && ent) { - HDassert(ret_value < 0); - - /* Free incomplete entry */ - ent->source_dset.file_name = (char *)H5MM_xfree(ent->source_dset.file_name); - ent->source_dset.dset_name = (char *)H5MM_xfree(ent->source_dset.dset_name); - if(ent->source_dset.virtual_select && H5S_close(ent->source_dset.virtual_select) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release virtual selection") - ent->source_dset.virtual_select = NULL; - if(ent->source_select && H5S_close(ent->source_select) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release source selection") - ent->source_select = NULL; - H5D_virtual_free_parsed_name(ent->parsed_source_file_name); - ent->parsed_source_file_name = NULL; - H5D_virtual_free_parsed_name(ent->parsed_source_dset_name); - ent->parsed_source_dset_name = NULL; + if(ret_value < 0) { + /* Free incomplete entry if present */ + if(ent) { + ent->source_dset.file_name = (char *)H5MM_xfree(ent->source_dset.file_name); + ent->source_dset.dset_name = (char *)H5MM_xfree(ent->source_dset.dset_name); + if(ent->source_dset.virtual_select && H5S_close(ent->source_dset.virtual_select) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release virtual selection") + ent->source_dset.virtual_select = NULL; + if(ent->source_select && H5S_close(ent->source_select) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release source selection") + ent->source_select = NULL; + H5D_virtual_free_parsed_name(ent->parsed_source_file_name); + ent->parsed_source_file_name = NULL; + H5D_virtual_free_parsed_name(ent->parsed_source_dset_name); + ent->parsed_source_dset_name = NULL; + } /* end if */ /* Free list if necessary */ if(free_list) |