summaryrefslogtreecommitdiffstats
path: root/src/H5D.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2011-02-08 15:55:31 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2011-02-08 15:55:31 (GMT)
commitf3ee1cc38d0604116afbffe72cd98dabfe1014a7 (patch)
treeb7b11d751b526c91b0e0695d34c66991b80d74b3 /src/H5D.c
parente1cd1485b8bb78b4a99ca4246c522bbaf3c0ed76 (diff)
parenta6d5fa2c7db165fa2cecee86bdbd201339349968 (diff)
downloadhdf5-f3ee1cc38d0604116afbffe72cd98dabfe1014a7.zip
hdf5-f3ee1cc38d0604116afbffe72cd98dabfe1014a7.tar.gz
hdf5-f3ee1cc38d0604116afbffe72cd98dabfe1014a7.tar.bz2
[svn-r20063] Merge changes from trunk from revision 19519 to 20062 into open_file_pool branch. No testing needed as the branch is currently identical to the trunk.
Diffstat (limited to 'src/H5D.c')
-rw-r--r--src/H5D.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/H5D.c b/src/H5D.c
index 91a7c3e..667fe1fb 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -256,6 +256,20 @@ H5Dcreate_anon(hid_t loc_id, hid_t type_id, hid_t space_id, hid_t dcpl_id,
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register dataset")
done:
+ /* Release the dataset's object header, if it was created */
+ if(dset) {
+ H5O_loc_t *oloc; /* Object location for dataset */
+
+ /* Get the new dataset's object location */
+ if(NULL == (oloc = H5D_oloc(dset)))
+ HDONE_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get object location of dataset")
+
+ /* Decrement refcount on dataset's object header in memory */
+ if(H5O_dec_rc_by_loc(oloc, H5AC_dxpl_id) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "unable to decrement refcount on newly created object")
+ } /* end if */
+
+ /* Cleanup on failure */
if(ret_value < 0)
if(dset && H5D_close(dset) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataset")