[PATCH 1/6] ntdll: Ignore free list headers in HEAP_FindFreeBlock.
Rémi Bernon
wine at gitlab.winehq.org
Mon May 23 03:14:33 CDT 2022
From: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon at 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)
{
--
GitLab
https://gitlab.winehq.org/wine/wine/-/merge_requests/114
More information about the wine-devel
mailing list