about summary refs log tree commit diff
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
parentbe2a5eb9df120c48247359f09e9b54f91a8cdd8c (diff)
downloadglibc-f6bd4e09b7ea8e10f74fecabf9909372dc0ed065.tar.gz
glibc-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.
-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);