summary refs log tree commit diff
path: root/malloc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2010-10-24 22:37:00 -0400
committerUlrich Drepper <drepper@redhat.com>2010-10-24 22:37:00 -0400
commitfdc0f374bcd2d0513569aa8d600f960e43e8af1d (patch)
treefac112c8335538c5b4be8fecf01145039e8fcadb /malloc
parentd0b9e94faf18f2585e7d0ae0b10daefb12f93059 (diff)
downloadglibc-fdc0f374bcd2d0513569aa8d600f960e43e8af1d.tar.gz
glibc-fdc0f374bcd2d0513569aa8d600f960e43e8af1d.tar.xz
glibc-fdc0f374bcd2d0513569aa8d600f960e43e8af1d.zip
Fix perturbing in malloc on free.
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 53ee1ccb87..f7770a394c 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)) {