From 854ede8cfe8434ff8ca838a87afdce3be2fc6524 Mon Sep 17 00:00:00 2001 From: Abel Mathew Date: Tue, 24 Apr 2012 02:36:31 +0000 Subject: [PATCH] ck_bag: Fix overallocation bug. Initialize bag->n_blocks to fix overallocation bug during initial ck_bag_put_spmc. --- src/ck_bag.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ck_bag.c b/src/ck_bag.c index 9fad26d..0321ef9 100644 --- a/src/ck_bag.c +++ b/src/ck_bag.c @@ -53,6 +53,7 @@ ck_bag_init(struct ck_bag *bag, bag->avail_head = bag->avail_tail = NULL; bag->head = NULL; bag->n_entries = 0; + bag->n_blocks = 0; bag->alloc_strat = as; /*