summaryrefslogtreecommitdiffstats
path: root/src/H5Dfill.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-07-30 18:06:32 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-07-30 18:06:32 (GMT)
commiteff803f8249485e8b1fdb5c71197314f0527c995 (patch)
tree46163e26a5b0be38e839f8f195b1821ba25f86d6 /src/H5Dfill.c
parent7fe87a24722f991ffc030782cd42d24df00dbace (diff)
downloadhdf5-eff803f8249485e8b1fdb5c71197314f0527c995.zip
hdf5-eff803f8249485e8b1fdb5c71197314f0527c995.tar.gz
hdf5-eff803f8249485e8b1fdb5c71197314f0527c995.tar.bz2
[svn-r19156] Description:
Bring revisions from Coverity branch back to trunk: r19044: Coverity #449 - Line 1560 called function H5O_chunk_protect for 2 pointers to allocate. But when there's failure on the second one, the first wasn't freed (H5O_chunk_unprotect). We fixed it by freeing the pointers when an error happens. r19045: Fixed coverity issue # 319. Free sec_node in done if it is not NULL. r19046: Add intended but missing assignments to initialize pointers to NULL (coverity issue fixes). r19049: Hdf5_1_8_coverity branch was recreated from hdf5_1_8 branch in revision 18839 without fix for Coverity issue #84 having been propagated to the hdf5_1_8 branch. This revision adds the fix again. r19060: added parentheses to see if they will keep subversion from getting confused r19061: Fix coverity item 139. Fixed incorrect condition for freeing buffer on error. Fix coverity items 20 and 21. Removed unused NTESTS facility from dtypes.c. Cleanup in H5Shyper.c. r19062: Fix coverity item 450. Check to see if chk_proxy has been allocated before attempting to free it. Fix coverity item 454. Check to see if allocation of buf failed in H5D_fill_refill_vl. Fix coverity items 455-457. Initilize hid_t's to -1, check their value before attempting to close them, and check if the close failed. r19063: New fix to address coverity issue #84. Check that pointers in H5Z_xform_find_type are not NULL before passing them to H5T_cmp. Tested on: Mac OS X/32 10.6.4 (amazon) w/debug & production (Too minor to require h5committest)
Diffstat (limited to 'src/H5Dfill.c')
-rw-r--r--src/H5Dfill.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/H5Dfill.c b/src/H5Dfill.c
index 1929a5a..467ce4b 100644
--- a/src/H5Dfill.c
+++ b/src/H5Dfill.c
@@ -596,6 +596,9 @@ H5D_fill_refill_vl(H5D_fill_buf_info_t *fb_info, size_t nelmts, hid_t dxpl_id)
buf = fb_info->fill_alloc_func(fb_info->fill_buf_size, fb_info->fill_alloc_info);
else
buf = H5FL_BLK_MALLOC(non_zero_fill, fb_info->fill_buf_size);
+ if(!buf)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "memory allocation failed for temporary fill buffer")
+
HDmemcpy(buf, fb_info->fill_buf, fb_info->fill_buf_size);
/* Type convert the dataset buffer, to copy any VL components */