From: Rémi Bernon rbernon@codeweavers.com
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/kernel32/tests/heap.c | 2 -- dlls/ntdll/heap.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/kernel32/tests/heap.c b/dlls/kernel32/tests/heap.c index f437a13a63e..5b7b0aacfc0 100644 --- a/dlls/kernel32/tests/heap.c +++ b/dlls/kernel32/tests/heap.c @@ -2435,9 +2435,7 @@ static void test_heap_layout( HANDLE handle, DWORD global_flag, DWORD heap_flags if (global_flag & FLG_HEAP_ENABLE_TAGGING) heap_flags |= HEAP_SHARED; if (!(global_flag & FLG_HEAP_PAGE_ALLOCS)) force_flags &= ~(HEAP_GROWABLE|HEAP_PRIVATE);
- todo_wine_if( (heap->force_flags & ~heap_flags) & (HEAP_TAIL_CHECKING_ENABLED|HEAP_FREE_CHECKING_ENABLED) ) ok( heap->force_flags == force_flags, "got force_flags %#x\n", heap->force_flags ); - todo_wine_if( (heap->flags & ~heap_flags) & (HEAP_TAIL_CHECKING_ENABLED|HEAP_FREE_CHECKING_ENABLED) ) ok( heap->flags == heap_flags, "got flags %#x\n", heap->flags );
if (heap->flags & HEAP_PAGE_ALLOCS) diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c index 1aa064723a8..d7ac44a4247 100644 --- a/dlls/ntdll/heap.c +++ b/dlls/ntdll/heap.c @@ -1570,6 +1570,7 @@ HANDLE WINAPI RtlCreateHeap( ULONG flags, PVOID addr, SIZE_T totalSize, SIZE_T c
/* Allocate the heap block */
+ flags &= ~(HEAP_TAIL_CHECKING_ENABLED|HEAP_FREE_CHECKING_ENABLED); if (processHeap) flags |= HEAP_PRIVATE; if (!processHeap || !totalSize || (flags & HEAP_SHARED)) flags |= HEAP_GROWABLE; if (!totalSize) totalSize = HEAP_DEF_SIZE;