summaryrefslogtreecommitdiffstats
path: root/src/H5Tcommit.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2005-10-03 05:50:05 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2005-10-03 05:50:05 (GMT)
commite21f821fc3cf10a549ccb849174b8a5a8f7cc90a (patch)
tree200ec069508aa5b2f831cfda31c0b239a0f5d1cc /src/H5Tcommit.c
parentc13178a42d007a4fb209d9b07bc2b018ac2756e4 (diff)
downloadhdf5-e21f821fc3cf10a549ccb849174b8a5a8f7cc90a.zip
hdf5-e21f821fc3cf10a549ccb849174b8a5a8f7cc90a.tar.gz
hdf5-e21f821fc3cf10a549ccb849174b8a5a8f7cc90a.tar.bz2
[svn-r11490] Purpose:
Bug fix Description: Fix "double root open" bug and apply same fix to datasets & named datatypes. Also fix bug in symbol table entry lookup code that would "transfer" an object from one file handle to another file handle when the two file handles were opened on the same actual file. Platforms tested: FreeBSD 4.11 (sleipnir) Too minor to require h5committest
Diffstat (limited to 'src/H5Tcommit.c')
-rw-r--r--src/H5Tcommit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c
index 030701e..098450d 100644
--- a/src/H5Tcommit.c
+++ b/src/H5Tcommit.c
@@ -242,6 +242,8 @@ H5T_commit(H5G_entry_t *loc, const char *name, H5T_t *type, hid_t dxpl_id,
type->shared->fo_count=1;
/* Add datatype to the list of open objects in the file */
+ if(H5FO_top_incr(type->ent.file, type->ent.header)<0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINC, NULL, "can't incr object ref. count")
if(H5FO_insert(type->ent.file, type->ent.header, type->shared)<0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, FAIL, "can't insert datatype into list of open objects")