Commit 4979ae5a authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

kernelbase: Restore HEAP_REALLOC_IN_PLACE_ONLY usage in LocalReAlloc.

This effectively reverts 2be9b0ff, which incorrectly removed the flag, when the reallocation failures the tests showed were coming from an underlying LFH in-place reallocation failure. Thus, it restores todo_wine where appropriate while removing other todos for sizes outside of the LFH block size range. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53996
parent a568704c
......@@ -991,13 +991,13 @@ HLOCAL WINAPI DECLSPEC_HOTPATCH LocalReAlloc( HLOCAL handle, SIZE_T size, UINT f
{
if (flags & LMEM_MODIFY) ret = handle;
else if (flags & LMEM_DISCARDABLE) SetLastError( ERROR_INVALID_PARAMETER );
else if (flags & LMEM_MOVEABLE)
else
{
if (!(flags & LMEM_MOVEABLE)) heap_flags |= HEAP_REALLOC_IN_PLACE_ONLY;
ret = HeapReAlloc( heap, heap_flags, ptr, size );
if (ret) RtlSetUserValueHeap( heap, heap_flags, ret, ret );
else SetLastError( ERROR_NOT_ENOUGH_MEMORY );
}
else SetLastError( ERROR_NOT_ENOUGH_MEMORY );
}
else if ((mem = unsafe_mem_from_HLOCAL( handle )))
{
......
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