summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5CS.c3
-rw-r--r--src/H5FS.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/H5CS.c b/src/H5CS.c
index e670c54..0c02034 100644
--- a/src/H5CS.c
+++ b/src/H5CS.c
@@ -27,7 +27,6 @@
*/
#include "H5private.h" /* Generic Functions */
#include "H5FSprivate.h" /* Private function stack routines */
-#include "H5MMprivate.h" /* Memory management functions */
#ifdef H5_HAVE_FUNCSTACK
@@ -86,7 +85,7 @@ H5FS_get_stack(void)
fstack = pthread_getspecific(H5TS_funcstk_key_g);
if (!fstack) {
/* no associated value with current thread - create one */
- fstack = (H5FS_t *)H5MM_calloc(sizeof(H5FS_t));
+ fstack = (H5FS_t *)HDmalloc(sizeof(H5FS_t)); /* Don't use H5MM_malloc() here, it causes infinite recursion */
pthread_setspecific(H5TS_funcstk_key_g, (void *)fstack);
}
diff --git a/src/H5FS.c b/src/H5FS.c
index e670c54..0c02034 100644
--- a/src/H5FS.c
+++ b/src/H5FS.c
@@ -27,7 +27,6 @@
*/
#include "H5private.h" /* Generic Functions */
#include "H5FSprivate.h" /* Private function stack routines */
-#include "H5MMprivate.h" /* Memory management functions */
#ifdef H5_HAVE_FUNCSTACK
@@ -86,7 +85,7 @@ H5FS_get_stack(void)
fstack = pthread_getspecific(H5TS_funcstk_key_g);
if (!fstack) {
/* no associated value with current thread - create one */
- fstack = (H5FS_t *)H5MM_calloc(sizeof(H5FS_t));
+ fstack = (H5FS_t *)HDmalloc(sizeof(H5FS_t)); /* Don't use H5MM_malloc() here, it causes infinite recursion */
pthread_setspecific(H5TS_funcstk_key_g, (void *)fstack);
}