aboutsummaryrefslogtreecommitdiffstats
path: root/malloc/malloc.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2005-07-18 02:46:03 +0000
committerRoland McGrath <roland@gnu.org>2005-07-18 02:46:03 +0000
commitf6bd4e09b7ea8e10f74fecabf9909372dc0ed065 (patch)
treef0a675c8f5288a5612ccf4016ed275c01e43fb4d /malloc/malloc.c
parent2005-05-22 Ulrich Drepper <drepper@redhat.com> (diff)
downloadglibc-f6bd4e09b7ea8e10f74fecabf9909372dc0ed065.tar.xz
glibc-f6bd4e09b7ea8e10f74fecabf9909372dc0ed065.zip
2005-03-15 Jakub Jelinek <jakub@redhat.com>
[BZ #779] * malloc/malloc.c (public_mTRIm): Initialize malloc if not yet initialized.
Diffstat (limited to '')
-rw-r--r--malloc/malloc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/malloc/malloc.c b/malloc/malloc.c
index e3ccbde7b5..35ec8d6a56 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -3766,6 +3766,8 @@ public_mTRIm(size_t s)
{
int result;
+ if(__malloc_initialized < 0)
+ ptmalloc_init ();
(void)mutex_lock(&main_arena.mutex);
result = mTRIm(s);
(void)mutex_unlock(&main_arena.mutex);