pool->size = size /* round extent size to min alignment reqs */
? (size + MINALIGN - 1) & ~(MINALIGN - 1)
: POOL_DEF_EXTENT;
- if (pool->flags & POOL_INTERN) {
+ if (flags & POOL_INTERN) {
pool->size -= sizeof (struct pool_extent);
flags |= POOL_APPEND;
}
cur->free -= skew;
}
next = cur->next;
+ cur->next = NULL;
}
} else {
next = cur->next;