diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2006-10-09 02:52:40 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2006-10-09 02:52:40 (GMT) |
commit | 6a18d20b406b2285fbf1d3f6c830b8147635597b (patch) | |
tree | 21da26bbe0fa87677c828508b1831bc873cc0d44 | |
parent | 4ebe2f792b23cf3f62f28e90495cd28a93bad06f (diff) | |
download | hdf5-6a18d20b406b2285fbf1d3f6c830b8147635597b.zip hdf5-6a18d20b406b2285fbf1d3f6c830b8147635597b.tar.gz hdf5-6a18d20b406b2285fbf1d3f6c830b8147635597b.tar.bz2 |
[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
-rw-r--r-- | src/H5HFcache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5HFcache.c b/src/H5HFcache.c index cd54db1..916c2e1 100644 --- a/src/H5HFcache.c +++ b/src/H5HFcache.c @@ -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)); |