diff --git a/src/plugins/select/bluegene/ba_bgq/block_allocator.c b/src/plugins/select/bluegene/ba_bgq/block_allocator.c
index e9736aabb7bb04ee76dd4c5a47ba091b9dc0c365..13cc2e0cedfa7e0384b5a5bbb8de881f28b56596 100644
--- a/src/plugins/select/bluegene/ba_bgq/block_allocator.c
+++ b/src/plugins/select/bluegene/ba_bgq/block_allocator.c
@@ -1093,6 +1093,7 @@ try_again:
 			     &geo_table, start_loc, total_bitmap, *node_count)))
 			break;
 
+		clear_cnt = bit_clear_count(total_bitmap);
 		FREE_NULL_BITMAP(total_bitmap);
 		/* User asked for a bad CPU count or we can't place it
 		   here in this small allocation. */