Skip to content

Commit

Permalink
* malloc/malloc.c (_int_malloc): sYSMALLOc might fail, in this
Browse files Browse the repository at this point in the history
	case don't call alloc_perturb.
  • Loading branch information
Ulrich Drepper committed Dec 11, 2007
1 parent 65bc770 commit 17edb30
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions malloc/malloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.)
*/
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 17edb30

Please sign in to comment.