summaryrefslogtreecommitdiffstats
path: root/src/H5Tvlen.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2003-12-29 17:56:08 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2003-12-29 17:56:08 (GMT)
commit16c51c2061e8c8bacd890ee9543ffcfd552bfb88 (patch)
tree2480c58a8dbd9d0f62a4d117939da83e2f51b2ec /src/H5Tvlen.c
parent99e520c8cb3a5e33a5e85ff267fe53e98da1b61e (diff)
downloadhdf5-16c51c2061e8c8bacd890ee9543ffcfd552bfb88.zip
hdf5-16c51c2061e8c8bacd890ee9543ffcfd552bfb88.tar.gz
hdf5-16c51c2061e8c8bacd890ee9543ffcfd552bfb88.tar.bz2
[svn-r7984] Purpose: bug fix
Description: VL datatype fails in certain way(hard to describe) Platforms tested: h5committest
Diffstat (limited to 'src/H5Tvlen.c')
-rw-r--r--src/H5Tvlen.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c
index 1a01458..057a309 100644
--- a/src/H5Tvlen.c
+++ b/src/H5Tvlen.c
@@ -818,16 +818,18 @@ H5T_vlen_disk_write(H5F_t *f, hid_t dxpl_id, void *_vl, void *buf, void *_bg, hs
HDmemset(&bg_hobjid,0,sizeof(H5HG_t));
UINT32DECODE(bg, bg_seq_len);
- /* Get heap information */
- H5F_addr_decode(f, (const uint8_t **)&bg, &(bg_hobjid.addr));
- INT32DECODE(bg, bg_hobjid.idx);
-
- /* Free heap object for old data */
- if(bg_hobjid.addr>0) {
- /* Free heap object */
- if(H5HG_remove(f, dxpl_id, &bg_hobjid)<0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_WRITEERROR, FAIL, "Unable to remove heap object")
- } /* end if */
+ if(bg_seq_len > 0) {
+ /* Get heap information */
+ H5F_addr_decode(f, (const uint8_t **)&bg, &(bg_hobjid.addr));
+ INT32DECODE(bg, bg_hobjid.idx);
+
+ /* Free heap object for old data */
+ if(bg_hobjid.addr>0) {
+ /* Free heap object */
+ if(H5HG_remove(f, dxpl_id, &bg_hobjid)<0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_WRITEERROR, FAIL, "Unable to remove heap object")
+ } /* end if */
+ } /* end if */
} /* end if */
/* Set the length of the sequence */