Rémi Bernon : ntdll: Set ARENA_FLAG_FREE flag in HEAP_CreateFreeBlock.
Alexandre Julliard
julliard at winehq.org
Fri May 20 15:26:48 CDT 2022
Module: wine
Branch: master
Commit: 523da9157f7d202da43fed36424651b1ca37e734
URL: https://source.winehq.org/git/wine.git/?a=commit;h=523da9157f7d202da43fed36424651b1ca37e734
Author: Rémi Bernon <rbernon at codeweavers.com>
Date: Mon May 2 14:20:56 2022 +0200
ntdll: Set ARENA_FLAG_FREE flag in HEAP_CreateFreeBlock.
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/heap.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c
index 8706b0f7774..89c32fe4fa9 100644
--- a/dlls/ntdll/heap.c
+++ b/dlls/ntdll/heap.c
@@ -600,7 +600,6 @@ static inline void HEAP_InsertFreeBlock( HEAP *heap, ARENA_FREE *pArena, BOOL la
/* insert at head of free list */
list_add_after( &pEntry->arena.entry, &pArena->entry );
}
- pArena->size |= ARENA_FLAG_FREE;
}
@@ -726,7 +725,7 @@ static void HEAP_CreateFreeBlock( SUBHEAP *subheap, void *ptr, SIZE_T size )
/* Last, insert the new block into the free list */
- pFree->size = size - sizeof(*pFree);
+ pFree->size = (size - sizeof(*pFree)) | ARENA_FLAG_FREE;
HEAP_InsertFreeBlock( subheap->heap, pFree, last );
}
More information about the wine-cvs
mailing list