aboutsummaryrefslogtreecommitdiff
path: root/malloc/arena.c
diff options
context:
space:
mode:
Diffstat (limited to 'malloc/arena.c')
-rw-r--r--malloc/arena.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/malloc/arena.c b/malloc/arena.c
index 1dd9deef0e..64a118c319 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -340,9 +340,11 @@ ptmalloc_init (void)
if (check_action != 0)
__malloc_check_init ();
}
- void (*hook) (void) = atomic_forced_read (__malloc_initialize_hook);
+#if HAVE_MALLOC_INIT_HOOK
+ void (*hook) (void) = atomic_forced_read (old__malloc_initialize_hook);
if (hook != NULL)
(*hook)();
+#endif
__malloc_initialized = 1;
}