ntdll: Mask block flags when computing HEAP_InsertFreeBlock size.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0416d2f167
commit
ba21d8fd54
|
@ -586,7 +586,8 @@ static HEAP *HEAP_GetPtr(
|
||||||
*/
|
*/
|
||||||
static inline void HEAP_InsertFreeBlock( HEAP *heap, ARENA_FREE *pArena, BOOL last )
|
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)
|
if (last)
|
||||||
{
|
{
|
||||||
/* insert at end of free list, i.e. before the next free list entry */
|
/* insert at end of free list, i.e. before the next free list entry */
|
||||||
|
|
Loading…
Reference in New Issue