Module: wine Branch: master Commit: 4502c1daa9da65f54ae894ee6b67b9ebda6b527a URL: https://gitlab.winehq.org/wine/wine/-/commit/4502c1daa9da65f54ae894ee6b67b9e...
Author: Rémi Bernon rbernon@codeweavers.com Date: Thu Dec 1 11:17:36 2022 +0100
ntdll: Move the insertion of the first block out of create_subheap.
---
dlls/ntdll/heap.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c index 8c23585fbd1..3eb29257d3b 100644 --- a/dlls/ntdll/heap.c +++ b/dlls/ntdll/heap.c @@ -954,7 +954,6 @@ static SUBHEAP *create_subheap( struct heap *heap, DWORD flags, SIZE_T total_siz block_init_free( first_block( subheap ), flags, subheap, block_size );
list_add_head( &heap->subheap_list, &subheap->entry ); - insert_free_block( heap, flags, subheap, first_block( subheap ) );
return subheap; } @@ -1000,9 +999,7 @@ static struct block *find_free_block( struct heap *heap, ULONG flags, SIZE_T blo
TRACE( "created new sub-heap %p of %#Ix bytes for heap %p\n", subheap, subheap_size( subheap ), heap );
- entry = first_block( subheap ); - list_remove( &entry->entry ); - return &entry->block; + return first_block( subheap ); }