Module: wine Branch: master Commit: a436cc6485a29beb7728528d005a6a30cd3934f6 URL: https://source.winehq.org/git/wine.git/?a=commit;h=a436cc6485a29beb7728528d0...
Author: Rémi Bernon rbernon@codeweavers.com Date: Tue May 3 18:19:36 2022 +0200
ntdll: Ignore free list headers in HEAP_FindFreeBlock.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com
---
dlls/ntdll/heap.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c index 96bb0d0c027..658a8bc1ab0 100644 --- a/dlls/ntdll/heap.c +++ b/dlls/ntdll/heap.c @@ -1069,6 +1069,7 @@ static struct block *find_free_block( HEAP *heap, SIZE_T data_size, SUBHEAP **su while ((ptr = list_next( &heap->freeList[0].arena.entry, ptr ))) { entry = LIST_ENTRY( ptr, struct entry, entry ); + if (entry->size == (0 | ARENA_FLAG_FREE)) continue; arena_size = (entry->size & ARENA_SIZE_MASK) + sizeof(ARENA_FREE) - sizeof(ARENA_INUSE); if (arena_size >= data_size) {