mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-27 02:10:55 +08:00
[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:
parent
4ebe2f792b
commit
6a18d20b40
@ -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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user