From 5fcc0b141bc5d174892450f2a69b75d5baa2dd67 Mon Sep 17 00:00:00 2001 From: Raymond Lu Date: Fri, 18 Jun 2004 11:18:42 -0500 Subject: [svn-r8705] Purpose: Bug fix and new test. Description: This is an enhancement after a user reported data writing failure for array datatype of compound type with variable-length type in the v1.6 branch. Solution: Added new test and ran with Purify. Fixed memory errors and leaks in H5Tconv.c. Platforms tested: h5committest --- src/H5Tconv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/H5Tconv.c b/src/H5Tconv.c index 1c76a16..5b36f97 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -2829,7 +2829,7 @@ H5T_conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, if(tpath->cdata.need_bkg) { /* Allocate background buffer */ bkg_buf_size=src->u.array.nelem*MAX(src->size,dst->size); - if ((bkg_buf=H5FL_BLK_MALLOC(array_seq,bkg_buf_size))==NULL) + if ((bkg_buf=H5FL_BLK_CALLOC(array_seq,bkg_buf_size))==NULL) HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion"); } /* end if */ -- cgit v0.12