From 3cc43c4229d6538157d5b2344789c528eac9e08f Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Tue, 30 Oct 2012 00:56:33 -0400 Subject: [PATCH] ck_epoch: Skip current record if it is marked as free. Pointed out by Matt Johnson . --- src/ck_epoch.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ck_epoch.c b/src/ck_epoch.c index 29c60f5..9dc1ac2 100644 --- a/src/ck_epoch.c +++ b/src/ck_epoch.c @@ -235,8 +235,10 @@ ck_epoch_scan(struct ck_epoch *global, cr = ck_epoch_record_container(cursor); state = ck_pr_load_uint(&cr->state); - if (state & CK_EPOCH_STATE_FREE) + if (state & CK_EPOCH_STATE_FREE) { + cursor = CK_STACK_NEXT(cursor); continue; + } active = ck_pr_load_uint(&cr->active); *af |= active;