]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
2005-03-15 Jakub Jelinek <jakub@redhat.com>
authorRoland McGrath <roland@gnu.org>
Mon, 18 Jul 2005 02:46:03 +0000 (02:46 +0000)
committerRoland McGrath <roland@gnu.org>
Mon, 18 Jul 2005 02:46:03 +0000 (02:46 +0000)
[BZ #779]
* malloc/malloc.c (public_mTRIm): Initialize malloc if not yet
initialized.

malloc/malloc.c

index e3ccbde7b5b84affbf6ff2387a5151310235f0a3..35ec8d6a569da7e2986886bf33a166838f894354 100644 (file)
@@ -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);