summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-05-19 06:05:31 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-05-19 06:05:31 (GMT)
commit8a2023b55273507844380b5173be6dcc56ffdada (patch)
tree92b21f38a429c7cf18de0ed729f8aacc80b26f8c
parent90b94c00fecc7f9ce603d868d4adfa5bc5a05831 (diff)
downloadhdf5-8a2023b55273507844380b5173be6dcc56ffdada.zip
hdf5-8a2023b55273507844380b5173be6dcc56ffdada.tar.gz
hdf5-8a2023b55273507844380b5173be6dcc56ffdada.tar.bz2
[svn-r15038] Description:
Bring revision 15037 from trunk: Better cleanup of internal structures when no szip encoder. Tested on: Linux/32 2.6 (kagiso) w/szip-no encoder
-rw-r--r--src/H5Dio.c8
-rw-r--r--test/noencoder.h5bin8088 -> 8088 bytes
2 files changed, 6 insertions, 2 deletions
diff --git a/src/H5Dio.c b/src/H5Dio.c
index 17bab19..b43ec04 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -291,6 +291,7 @@ H5D_read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
H5D_chunk_map_t fm; /* Chunk file<->memory mapping */
H5D_io_info_t io_info; /* Dataset I/O info */
H5D_type_info_t type_info; /* Datatype info for operation */
+ hbool_t type_info_init = FALSE; /* Whether the datatype info has been initialized */
H5D_storage_t store; /*union of EFL and chunk pointer in file space */
hssize_t snelmts; /*total number of elmts (signed) */
hsize_t nelmts; /*total number of elmts */
@@ -322,6 +323,7 @@ H5D_read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
/* Set up datatype info for operation */
if(H5D_typeinfo_init(dataset, dxpl_cache, dxpl_id, mem_type_id, FALSE, &type_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up type info")
+ type_info_init = TRUE;
#ifdef H5_HAVE_PARALLEL
/* Collective access is not permissible without a MPI based VFD */
@@ -415,7 +417,7 @@ done:
HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "can't shut down io_info")
#endif /*H5_HAVE_PARALLEL*/
/* Shut down datatype info for operation */
- if(H5D_typeinfo_term(&type_info) < 0)
+ if(type_info_init && H5D_typeinfo_term(&type_info) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to shut down type info")
FUNC_LEAVE_NOAPI(ret_value)
@@ -442,6 +444,7 @@ H5D_write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
H5D_chunk_map_t fm; /* Chunk file<->memory mapping */
H5D_io_info_t io_info; /* Dataset I/O info */
H5D_type_info_t type_info; /* Datatype info for operation */
+ hbool_t type_info_init = FALSE; /* Whether the datatype info has been initialized */
H5D_storage_t store; /*union of EFL and chunk pointer in file space */
hssize_t snelmts; /*total number of elmts (signed) */
hsize_t nelmts; /*total number of elmts */
@@ -477,6 +480,7 @@ H5D_write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
/* Set up datatype info for operation */
if(H5D_typeinfo_init(dataset, dxpl_cache, dxpl_id, mem_type_id, TRUE, &type_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up type info")
+ type_info_init = TRUE;
/* Various MPI based checks */
#ifdef H5_HAVE_PARALLEL
@@ -602,7 +606,7 @@ done:
HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "can't shut down io_info")
#endif /*H5_HAVE_PARALLEL*/
/* Shut down datatype info for operation */
- if(H5D_typeinfo_term(&type_info) < 0)
+ if(type_info_init && H5D_typeinfo_term(&type_info) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to shut down type info")
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/test/noencoder.h5 b/test/noencoder.h5
index add52e3..84f8752 100644
--- a/test/noencoder.h5
+++ b/test/noencoder.h5
Binary files differ