1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

Fix perturbing in malloc on free.

This commit is contained in:
Ulrich Drepper
2010-10-24 22:37:00 -04:00
parent d0b9e94faf
commit fdc0f374bc
3 changed files with 10 additions and 4 deletions

View File

@ -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)) {