summaryrefslogtreecommitdiffstats
path: root/src/H5O.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5O.c')
-rw-r--r--src/H5O.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/H5O.c b/src/H5O.c
index d1806a1..aa30e79 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -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: