1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

* malloc/malloc.c (public_rEALLOc): When new arena is used, copy

really all bytes.  Patch by Denys Vlasenko <dvlasenk@redhat.com>.
This commit is contained in:
Ulrich Drepper
2008-11-03 08:07:39 +00:00
parent efac1fce62
commit 486bdb8863
3 changed files with 11 additions and 2 deletions

View File

@ -3717,7 +3717,7 @@ public_rEALLOc(Void_t* oldmem, size_t bytes)
newp = public_mALLOc(bytes);
if (newp != NULL)
{
MALLOC_COPY (newp, oldmem, oldsize - 2 * SIZE_SZ);
MALLOC_COPY (newp, oldmem, oldsize - SIZE_SZ);
#if THREAD_STATS
if(!mutex_trylock(&ar_ptr->mutex))
++(ar_ptr->stat_lock_direct);