summaryrefslogtreecommitdiffstats
path: root/src/H5O.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5O.c')
-rw-r--r--src/H5O.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/H5O.c b/src/H5O.c
index 3daf09e..aa30e79 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -1051,7 +1051,7 @@ done:
* the same effect as calling H5Gclose, H5Dclose, or H5Tclose.
*
* Return: Success: Non-negative
- * Failure: Negative
+ * Failure: Negative
*
* Programmer: James Laird
* July 14 2006
@@ -1069,14 +1069,18 @@ H5Oclose(hid_t object_id)
/* Get the type of the object and close it in the correct way */
switch(H5I_get_type(object_id)) {
case H5I_GROUP:
- case H5I_DATATYPE:
case H5I_DATASET:
if(H5I_object(object_id) == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid object")
if(H5I_dec_app_ref(object_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to close object")
break;
-
+ case H5I_DATATYPE:
+ if(H5I_object(object_id) == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid object")
+ if(H5T_close_id(object_id) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to close object")
+ break;
case H5I_UNINIT:
case H5I_BADID:
case H5I_FILE: