diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2016-01-01 06:28:04 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2016-01-01 06:28:04 (GMT) |
commit | f60170dac7c491cc75120a6ebdfe73c13c0bab1d (patch) | |
tree | 6adfe7a8ccaa4c7cf6a0ae8aa2b4e7deb0518521 /src/H5TS.c | |
parent | 8d8d56d7d1601a88b90524c7bcb78c2515ce770f (diff) | |
download | hdf5-f60170dac7c491cc75120a6ebdfe73c13c0bab1d.zip hdf5-f60170dac7c491cc75120a6ebdfe73c13c0bab1d.tar.gz hdf5-f60170dac7c491cc75120a6ebdfe73c13c0bab1d.tar.bz2 |
[svn-r28761] Description:
Clean up many mismatches between malloc/free and H5MM_malloc/H5MM_xfree
in the library and tests (and use of H5free_memory and H5Dvlen_reclaim). Also
make H5Ocopy use a private version of H5Lexists, which doesn't internally
throw (and suppress) errors when an object (or the path to it) isn't found in
the destination.
Tested on:
MacOSX/64 10.11.2 (amazon) w/serial & parallel
(h5committest forthcoming)
Diffstat (limited to 'src/H5TS.c')
-rw-r--r-- | src/H5TS.c | 17 |
1 files changed, 8 insertions, 9 deletions
@@ -255,19 +255,18 @@ H5TS_cancel_count_inc(void) if (!cancel_counter) { /* - * First time thread calls library - create new counter and associate + * First time thread calls library - create new counter and associate * with key */ - cancel_counter = (H5TS_cancel_t *)H5MM_calloc(sizeof(H5TS_cancel_t)); + cancel_counter = (H5TS_cancel_t *)HDcalloc(1, sizeof(H5TS_cancel_t)); - if (!cancel_counter) { - H5E_push_stack(NULL, "H5TS_cancel_count_inc", - __FILE__, __LINE__, H5E_ERR_CLS_g, H5E_RESOURCE, H5E_NOSPACE, "memory allocation failed"); - return FAIL; - } + if (!cancel_counter) { + H5E_push_stack(NULL, "H5TS_cancel_count_inc", __FILE__, __LINE__, + H5E_ERR_CLS_g, H5E_RESOURCE, H5E_NOSPACE, "memory allocation failed"); + return FAIL; + } - ret_value = pthread_setspecific(H5TS_cancel_key_g, - (void *)cancel_counter); + ret_value = pthread_setspecific(H5TS_cancel_key_g, (void *)cancel_counter); } if (cancel_counter->cancel_count == 0) |