kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 69f26823b9e24f34b9a14b0e8561b5720bd0ce68
parent 1375190936703cca92db19b23d49446dd2c512af
Author: Joris Vink <joris@coders.se>
Date:   Thu,  6 Mar 2014 08:20:05 +0100

Double check the element is free in kore_pool_get().

Diffstat:
src/pool.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/pool.c b/src/pool.c @@ -54,6 +54,8 @@ kore_pool_get(struct kore_pool *pool) } entry = LIST_FIRST(&(pool->freelist)); + if (entry->state != POOL_ELEMENT_FREE) + fatal("%s: element %p was not free", pool->name, ptr); LIST_REMOVE(entry, list); entry->state = POOL_ELEMENT_BUSY;