summaryrefslogtreecommitdiffstats
path: root/src/H5Pdcpl.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2015-06-03 18:00:58 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2015-06-03 18:00:58 (GMT)
commit5d12a79db20305b7c08e505a683a4c1e38e9039a (patch)
treed033bb9898996b35d679bbec64da056d0bd1a444 /src/H5Pdcpl.c
parent9a8c664ff0d9884b8ce2bde543685245cb73f6bb (diff)
downloadhdf5-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.c32
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)