mirror of https://git.kore.io/kore.git
Double check the element is free in kore_pool_get().
This commit is contained in:
parent
1375190936
commit
69f26823b9
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue