summaryrefslogtreecommitdiffstats
path: root/src/H5FP.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-11-08 15:32:53 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-11-08 15:32:53 (GMT)
commit0497e80b5017f0292a3232cfec4e268f9776d137 (patch)
treeadf245ba8f035a20cb91e688a2529e439674634c /src/H5FP.c
parentdd969f1eadfd2cd500f3f44415b85cfea7216794 (diff)
downloadhdf5-0497e80b5017f0292a3232cfec4e268f9776d137.zip
hdf5-0497e80b5017f0292a3232cfec4e268f9776d137.tar.gz
hdf5-0497e80b5017f0292a3232cfec4e268f9776d137.tar.bz2
[svn-r7829] Purpose:
Bug fix & code cleanup Description: Allowing the library to call malloc with a size of 0 bytes causes problems for some users, so we check for allocations of 0 bytes and disallow them now. Cleaned up some code which could call malloc with 0 size. Changed some code calling HDmalloc directly to call H5MM_malloc(), which allows us to check for 0 sized allocations. Platforms tested: FreeBSD 4.9 (sleipnir) too minor to require h5committest
Diffstat (limited to 'src/H5FP.c')
-rw-r--r--src/H5FP.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5FP.c b/src/H5FP.c
index 77383ee..a0062e1 100644
--- a/src/H5FP.c
+++ b/src/H5FP.c
@@ -317,7 +317,7 @@ H5FP_read_metadata(char **mdata, int len, int from)
* There is metadata associated with this request. Get it as a
* string (requires another read).
*/
- if ((*mdata = (char *)HDmalloc((size_t)len + 1)) == NULL)
+ if ((*mdata = (char *)H5MM_malloc((size_t)len + 1)) == NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "out of memory");
HDmemset(*mdata, 0, (size_t)len + 1);