util: mempool: initialize last block's magic number in a page
authorMarek Olšák <maraeo@gmail.com>
Mon, 19 Jul 2010 21:26:17 +0000 (23:26 +0200)
committerMarek Olšák <maraeo@gmail.com>
Tue, 20 Jul 2010 08:23:54 +0000 (10:23 +0200)
src/gallium/auxiliary/util/u_mempool.c

index 0ce4b6cf1a7a175863b3180cd33364b8c107b4d0..84e2a34acc63a685b049a3e1e0420ee488ce9a40 100644 (file)
@@ -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++;