diff --git a/include/common/memory.h b/include/common/memory.h index da96b8292..5fde4bcdd 100644 --- a/include/common/memory.h +++ b/include/common/memory.h @@ -267,12 +267,12 @@ static inline void *pool_alloc(struct pool_head *pool) */ static inline void __pool_free(struct pool_head *pool, void *ptr) { - void *free_list = pool->free_list; + void **free_list = pool->free_list; do { *POOL_LINK(pool, ptr) = (void *)free_list; __ha_barrier_store(); - } while (!HA_ATOMIC_CAS(&pool->free_list, (void **)&free_list, ptr)); + } while (!HA_ATOMIC_CAS(&pool->free_list, &free_list, ptr)); HA_ATOMIC_SUB(&pool->used, 1); }