about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--malloc/arena.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index b72a1f0147..5e1ca232fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-04-24  Jakub Jelinek  <jakub@redhat.com>
+
+	* malloc/arena.c (ptmalloc_init): Don't call __malloc_check_init
+	if MALLOC_CHECK_ env var contains an empty string.
+
 2006-04-24  Ulrich Drepper  <drepper@redhat.com>
 
 	* sysdeps/posix/getaddrinfo.c (getaddrinfo): Always initialize in6ai.
diff --git a/malloc/arena.c b/malloc/arena.c
index 4d95462f26..6f0a9df8f1 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -551,8 +551,8 @@ ptmalloc_init (void)
     }
   s = getenv("MALLOC_CHECK_");
 #endif
-  if(s) {
-    if(s[0]) mALLOPt(M_CHECK_ACTION, (int)(s[0] - '0'));
+  if(s && s[0]) {
+    mALLOPt(M_CHECK_ACTION, (int)(s[0] - '0'));
     if (check_action != 0)
       __malloc_check_init();
   }