mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-09 12:58:41 +03:00
o pool_empty was very wrong
This commit is contained in:
parent
81523ab68a
commit
33f50a342d
@ -93,8 +93,13 @@ void *pool_alloc_aligned(struct pool *p, size_t s, unsigned alignment)
|
||||
|
||||
void pool_empty(struct pool *p)
|
||||
{
|
||||
struct chunk *c;
|
||||
|
||||
for (c = p->chunk; c && c->prev; c = c->prev)
|
||||
;
|
||||
|
||||
if (p->chunk)
|
||||
pool_free(p, p->chunk->begin);
|
||||
pool_free(p, (char *) (p->chunk + 1));
|
||||
}
|
||||
|
||||
void pool_free(struct pool *p, void *ptr)
|
||||
|
Loading…
x
Reference in New Issue
Block a user