diff --git a/lib/memory_pool.c b/lib/memory_pool.c index afdd8f4d..92b3da8d 100644 --- a/lib/memory_pool.c +++ b/lib/memory_pool.c @@ -15,8 +15,7 @@ static void pool_init_tags(struct memory_pool* pool, void* obj) uint8_t* canary = (uint8_t*)obj + POOL_CANARY_OFF; uint8_t* counter = (uint8_t*)obj + POOL_TAG_OFF; *canary = POOL_CANARY_VAL; - *counter = ++pool->alloc_tag_counter; - if (pool->alloc_tag_counter == 0) pool->alloc_tag_counter = 1; + *counter = 1; } static void pool_check_and_clear_tags(struct memory_pool* pool, void* obj, const char* location)