summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libc/db/mpool/mpool.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/db/mpool/mpool.c b/lib/libc/db/mpool/mpool.c
index 59ed4d3..a4ab912 100644
--- a/lib/libc/db/mpool/mpool.c
+++ b/lib/libc/db/mpool/mpool.c
@@ -271,7 +271,8 @@ mpool_close(mp)
BKT *bp;
/* Free up any space allocated to the lru pages. */
- while ((bp = TAILQ_FIRST(&mp->lqh)) != (void *)&mp->lqh) {
+ while (!TAILQ_EMPTY(&mp->lqh)) {
+ bp = TAILQ_FIRST(&mp->lqh);
TAILQ_REMOVE(&mp->lqh, bp, q);
free(bp);
}
OpenPOWER on IntegriCloud