diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2008-05-19 06:03:16 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2008-05-19 06:03:16 (GMT) |
commit | bdd56bd8da15479a0413a48f285e20266cfd338f (patch) | |
tree | cd96c28af526caf04c11cf03950b12cdf94ab474 /src/H5Dio.c | |
parent | ca94c839d55e383f541c9713e0a0aa085a0572af (diff) | |
download | hdf5-bdd56bd8da15479a0413a48f285e20266cfd338f.zip hdf5-bdd56bd8da15479a0413a48f285e20266cfd338f.tar.gz hdf5-bdd56bd8da15479a0413a48f285e20266cfd338f.tar.bz2 |
[svn-r15037] Description:
Better cleanup of internal structures when no szip encoder.
Tested on:
Linux/32 2.6 (kagiso) w/szip-no encoder
Diffstat (limited to 'src/H5Dio.c')
-rw-r--r-- | src/H5Dio.c | 8 |
1 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) |