From 6a18d20b406b2285fbf1d3f6c830b8147635597b Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Sun, 8 Oct 2006 21:52:40 -0500 Subject: [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 --- src/H5HFcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); -- cgit v0.12