mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
o pool_empty was very wrong
This commit is contained in:
parent
01c4ac1315
commit
801495c0f7
@ -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…
Reference in New Issue
Block a user