Skip to content

Commit

Permalink
Use actual number of blocks, not read from non-initialized memory.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehpor committed Dec 20, 2024
1 parent 8cbc70c commit 7c5bd95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion catkit_core/FreeListAllocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ std::shared_ptr<FreeListAllocator> FreeListAllocator::Create(void *metadata_buff

void *block_allocator_memory;
Block *blocks;
GetMemoryLayout(metadata_buffer, header->max_num_blocks, &block_allocator_memory, &blocks);
GetMemoryLayout(metadata_buffer, max_num_blocks, &block_allocator_memory, &blocks);

// Fill in the header information.
std::copy(VERSION, VERSION + sizeof(VERSION), header->version);
Expand Down

0 comments on commit 7c5bd95

Please sign in to comment.