Commit 13a33b73 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Free old memory block when reallocating to a large block.

parent 8c017aaf
......@@ -1555,7 +1555,8 @@ PVOID WINAPI RtlReAllocateHeap( HANDLE heap, ULONG flags, PVOID ptr, SIZE_T size
if (!(ret = allocate_large_block( heapPtr, flags, size ))) goto oom;
notify_alloc( ret, size, flags & HEAP_ZERO_MEMORY );
memcpy( ret, pArena + 1, oldActualSize );
/* FIXME: free old memory here! */
notify_free( pArena + 1 );
HEAP_MakeInUseBlockFree( subheap, pArena );
goto done;
}
if ((pNext < (char *)subheap->base + subheap->size) &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment