aboutsummaryrefslogtreecommitdiff
path: root/malloc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2010-10-24 22:37:00 -0400
committerAndreas Schwab <schwab@redhat.com>2010-12-01 15:35:16 +0100
commite939403de10e923627043a795051b63ad46e5168 (patch)
treec192a499f6863834df698640db74088f60413a61 /malloc
parente389efdffdcafae116ce8155276d97469e759891 (diff)
downloadglibc-e939403de10e923627043a795051b63ad46e5168.tar.xz
glibc-e939403de10e923627043a795051b63ad46e5168.zip
Fix perturbing in malloc on free.
(cherry picked from commit fdc0f374bcd2d0513569aa8d600f960e43e8af1d)
Diffstat (limited to 'malloc')
-rw-r--r--malloc/malloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 9594be4cbd..b492c0a3fd 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -4850,7 +4850,7 @@ _int_free(mstate av, mchunkptr p)
}
if (__builtin_expect (perturb_byte, 0))
- free_perturb (chunk2mem(p), size - SIZE_SZ);
+ free_perturb (chunk2mem(p), size - 2 * SIZE_SZ);
set_fastchunks(av);
unsigned int idx = fastbin_index(size);
@@ -4954,7 +4954,7 @@ _int_free(mstate av, mchunkptr p)
}
if (__builtin_expect (perturb_byte, 0))
- free_perturb (chunk2mem(p), size - SIZE_SZ);
+ free_perturb (chunk2mem(p), size - 2 * SIZE_SZ);
/* consolidate backward */
if (!prev_inuse(p)) {