diff --git a/src/system/kernel/heap.cpp b/src/system/kernel/heap.cpp index c2e611605e..e4e2dd5e41 100644 --- a/src/system/kernel/heap.cpp +++ b/src/system/kernel/heap.cpp @@ -2263,6 +2263,7 @@ realloc(void *address, size_t newSize) // there is enough room available for the newSize TRACE(("realloc(): new size %ld fits in old area %ld with %ld " "available\n", newSize, area, available)); + info->allocation_size = newSize; return address; } diff --git a/src/system/libroot/posix/malloc_debug/heap.cpp b/src/system/libroot/posix/malloc_debug/heap.cpp index ad8f88faac..c25a807156 100644 --- a/src/system/libroot/posix/malloc_debug/heap.cpp +++ b/src/system/libroot/posix/malloc_debug/heap.cpp @@ -1689,6 +1689,7 @@ realloc(void *address, size_t newSize) // there is enough room available for the newSize INFO(("realloc(): new size %ld fits in old area %ld with %ld " "available\n", newSize, area, available)); + info->allocation_size = newSize; return address; }