diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-06-01 02:49:13 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-06-01 02:49:13 (GMT) |
commit | 2aa1084117a0040dbb6c54246837cd3133f51bdf (patch) | |
tree | 612f8a2a09b33f002c78f01e4342032b1f5e5a12 /src/H5D.c | |
parent | 5279ef2f48eeccfd5d282670859d80d3fd782573 (diff) | |
download | hdf5-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.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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) { |