ntdll: Don't switch from small to large block when HEAP_REALLOC_IN_PLACE_ONLY is specified.

This commit is contained in:
Alexandre Julliard 2009-08-05 20:35:36 +02:00
parent 31dab8f0db
commit 7f64b8a9a9

View file

@ -1564,6 +1564,7 @@ PVOID WINAPI RtlReAllocateHeap( HANDLE heap, ULONG flags, PVOID ptr, SIZE_T size
if (rounded_size >= HEAP_MIN_LARGE_BLOCK_SIZE && (flags & HEAP_GROWABLE))
{
if (flags & HEAP_REALLOC_IN_PLACE_ONLY) goto oom;
if (!(ret = allocate_large_block( heapPtr, flags, size ))) goto oom;
notify_alloc( ret, size, flags & HEAP_ZERO_MEMORY );
memcpy( ret, pArena + 1, oldActualSize );