util: mempool: initialize last block's magic number in a page
This commit is contained in:
parent
87290a383b
commit
bdde9d2fce
1 changed files with 1 additions and 0 deletions
|
|
@ -69,6 +69,7 @@ static void util_mempool_add_new_page(struct util_mempool *pool)
|
|||
|
||||
block = util_mempool_get_block(pool, page, pool->num_blocks-1);
|
||||
block->next_free = pool->first_free;
|
||||
block->magic = UTIL_MEMPOOL_MAGIC;
|
||||
pool->first_free = util_mempool_get_block(pool, page, 0);
|
||||
pool->num_pages++;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue