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

ntdll: Mask block flags when computing HEAP_InsertFreeBlock size.

parent 0416d2f1
......@@ -586,7 +586,8 @@ static HEAP *HEAP_GetPtr(
*/
static inline void HEAP_InsertFreeBlock( HEAP *heap, ARENA_FREE *pArena, BOOL last )
{
FREE_LIST_ENTRY *pEntry = heap->freeList + get_freelist_index( pArena->size + sizeof(*pArena) );
SIZE_T block_size = (pArena->size & ARENA_SIZE_MASK) + sizeof(*pArena);
FREE_LIST_ENTRY *pEntry = heap->freeList + get_freelist_index( block_size );
if (last)
{
/* insert at end of free list, i.e. before the next free list entry */
......
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