summaryrefslogtreecommitdiffstats
path: root/src/H5D.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-06-01 02:49:13 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-06-01 02:49:13 (GMT)
commit2aa1084117a0040dbb6c54246837cd3133f51bdf (patch)
tree612f8a2a09b33f002c78f01e4342032b1f5e5a12 /src/H5D.c
parent5279ef2f48eeccfd5d282670859d80d3fd782573 (diff)
downloadhdf5-2aa1084117a0040dbb6c54246837cd3133f51bdf.zip
hdf5-2aa1084117a0040dbb6c54246837cd3133f51bdf.tar.gz
hdf5-2aa1084117a0040dbb6c54246837cd3133f51bdf.tar.bz2
[svn-r13827] Description:
Close another memory leak for VL fill values, and clean up some temporary data structures on error. Tested on: FreeBSD/32 6.2 (duty) Mac OS X/32 10.4.9 (amazon)
Diffstat (limited to 'src/H5D.c')
-rw-r--r--src/H5D.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/H5D.c b/src/H5D.c
index 5293714..9f5ee19 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -902,8 +902,11 @@ H5Dget_create_plist(hid_t dset_id)
/* Allocate a background buffer */
bkg_size = MAX(H5T_get_size(copied_fill.type), H5T_get_size(dset->shared->type));
- if(H5T_path_bkg(tpath) && NULL == (bkg_buf = H5FL_BLK_CALLOC(type_conv, bkg_size)))
+ if(H5T_path_bkg(tpath) && NULL == (bkg_buf = H5FL_BLK_CALLOC(type_conv, bkg_size))) {
+ H5I_dec_ref(src_id);
+ H5I_dec_ref(dst_id);
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ } /* end if */
/* Convert fill value */
if(H5T_convert(tpath, src_id, dst_id, (size_t)1, (size_t)0, (size_t)0, copied_fill.buf, bkg_buf, H5AC_ind_dxpl_id) < 0) {