[svn-r12733] Description:

Use calloc() instead of malloc(), in order to fail a bit more gracefully
on errors.

Tested on:
    FreeBSD/32 4.11 (sleipnir) w/threadsafe
    Linux/32 2.4 (heping) w/FORTRAN & C++
    Linux/64 2.4 (mir) w/enable-1.6-compat
This commit is contained in:
Quincey Koziol 2006-10-08 21:52:40 -05:00
parent 4ebe2f792b
commit 6a18d20b40

View File

@ -702,7 +702,7 @@ HDfprintf(stderr, "%s: Load indirect block, addr = %a\n", FUNC, addr);
HDassert(par_info);
/* Allocate space for the fractal heap indirect block */
if(NULL == (iblock = H5FL_MALLOC(H5HF_indirect_t)))
if(NULL == (iblock = H5FL_CALLOC(H5HF_indirect_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
HDmemset(&iblock->cache_info, 0, sizeof(H5AC_info_t));