diff --git a/WHATS_NEW b/WHATS_NEW index f605e5efc..49efce1c2 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.00.24 - ===================================== + Fix pool_empty so it really does empty the memory pool. Rename old segtypes files to segtype. Some fixes to memory debugging code. Exclude internal commands formats & segtypes from install. diff --git a/lib/mm/pool-fast.c b/lib/mm/pool-fast.c index 319c67af1..5a7564264 100644 --- a/lib/mm/pool-fast.c +++ b/lib/mm/pool-fast.c @@ -109,8 +109,8 @@ void pool_empty(struct pool *p) for (c = p->chunk; c && c->prev; c = c->prev) ; - if (p->chunk) - pool_free(p, (char *) (p->chunk + 1)); + if (c) + pool_free(p, (char *) (c + 1)); } void pool_free(struct pool *p, void *ptr)