]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* malloc/malloc.c (_int_malloc): sYSMALLOc might fail, in this
authorUlrich Drepper <drepper@redhat.com>
Tue, 11 Dec 2007 23:46:43 +0000 (23:46 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 11 Dec 2007 23:46:43 +0000 (23:46 +0000)
case don't call alloc_perturb.

ChangeLog
malloc/malloc.c

index c94d0e4cfd8af21c310d94a0df0f498b06bfe032..531d6b9a5cc54764c39ed2cc4e990f97c149244a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-12-11  Ulrich Drepper  <drepper@redhat.com>
+
+       * malloc/malloc.c (_int_malloc): sYSMALLOc might fail, in this
+       case don't call alloc_perturb.
+
 2007-12-10  Ulrich Drepper  <drepper@redhat.com>
 
        * sysdeps/unix/sysv/linux/adjtime.c: Use ADJ_OFFSET_SS_READ if
index 39d5b3fa52cfb8d1d6382556b057c818b8b697e9..1e716089a2b976d120c304ad75dd95c63737ad75 100644 (file)
@@ -4475,7 +4475,7 @@ _int_malloc(mstate av, size_t bytes)
 
       We require that av->top always exists (i.e., has size >=
       MINSIZE) after initialization, so if it would otherwise be
-      exhuasted by current request, it is replenished. (The main
+      exhausted by current request, it is replenished. (The main
       reason for ensuring it exists is that we may need MINSIZE space
       to put in fenceposts in sysmalloc.)
     */
@@ -4515,7 +4515,7 @@ _int_malloc(mstate av, size_t bytes)
     */
     else {
       void *p = sYSMALLOc(nb, av);
-      if (__builtin_expect (perturb_byte, 0))
+      if (p != NULL && __builtin_expect (perturb_byte, 0))
        alloc_perturb (p, bytes);
       return p;
     }