Dereference allocation->contention_counters before trying to take the
address of an element.
magazine_cache_pop_magazine (guint ix,
gsize *countp)
{
- g_mutex_lock_a (&allocator->magazine_mutex, &allocator->contention_counters[ix]);
+ guint *counters = allocator->contention_counters;
+ g_mutex_lock_a (&allocator->magazine_mutex, &counters[ix]);
if (!allocator->magazines[ix])
{
guint magazine_threshold = allocator_get_magazine_threshold (allocator, ix);