summaryrefslogtreecommitdiffstats
path: root/src/H5T.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2011-05-02 04:12:47 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2011-05-02 04:12:47 (GMT)
commit1a93a07867719104184bce3e4a256a519aacf6ac (patch)
tree7dec8555dee6130af4e7992f69061c746181bd37 /src/H5T.c
parent4e204929ab54838d5e218c43776eff65bba78758 (diff)
downloadhdf5-1a93a07867719104184bce3e4a256a519aacf6ac.zip
hdf5-1a93a07867719104184bce3e4a256a519aacf6ac.tar.gz
hdf5-1a93a07867719104184bce3e4a256a519aacf6ac.tar.bz2
[svn-r20691] Purpose: Fix problem exposed by external link cache
Description: When closing an object that had two open id's, the library would previously fail to account for the status of the "holding_file" field, potentially causing the file's "nopen_objs" field to become inconsistent. This caused problems when opening the same object twice through an external link using th external file cache. Modified the library to properly account for the status of the "holding_file" field when closing an object id, even when the underlying "shared" object isn't closed. Tested: jam, koala, heiwa (h5committest)
Diffstat (limited to 'src/H5T.c')
-rw-r--r--src/H5T.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/H5T.c b/src/H5T.c
index 25b241b..a34783a 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -3594,6 +3594,11 @@ H5T_close(H5T_t *dt)
if(H5O_close(&dt->oloc) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to close")
} /* end if */
+ else
+ /* Free object location (i.e. "unhold" the file if appropriate)
+ */
+ if(H5O_loc_free(&(dt->oloc)) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRELEASE, FAIL, "problem attempting to free location")
} /* end if */
/* Free the group hier. path since we're not calling H5T_free*/