diff --git a/test/regress_bufferevent.c b/test/regress_bufferevent.c index ea64202a..a87e02ed 100644 --- a/test/regress_bufferevent.c +++ b/test/regress_bufferevent.c @@ -233,10 +233,11 @@ static lock_wrapper *lu_find(void *lock_) static void *trace_lock_alloc(unsigned locktype) { + void *lock; ++lu_base.nr_locks; lu_base.locks = realloc(lu_base.locks, sizeof(lock_wrapper) * lu_base.nr_locks); - void *lock = lu_base.cbs.alloc(locktype); + lock = lu_base.cbs.alloc(locktype); lu_base.locks[lu_base.nr_locks - 1] = (lock_wrapper){ lock, ALLOC, 0 }; return lock; }