aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/mem_pool.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-08-24 13:16:54 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-08-24 13:17:16 +0100
commit12594e3596b115b7dd2c83bed0714456d47b7aef (patch)
treed86d22b4533e09cd8b392007c4d49a4ac27d0a4c /src/libutil/mem_pool.c
parentfe575c5c9807b4a3860873c97dc890cc8707f759 (diff)
downloadrspamd-12594e3596b115b7dd2c83bed0714456d47b7aef.tar.gz
rspamd-12594e3596b115b7dd2c83bed0714456d47b7aef.zip
[Minor] Fix empty pools handling
Diffstat (limited to 'src/libutil/mem_pool.c')
-rw-r--r--src/libutil/mem_pool.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libutil/mem_pool.c b/src/libutil/mem_pool.c
index fc0c18e8b..9856e9198 100644
--- a/src/libutil/mem_pool.c
+++ b/src/libutil/mem_pool.c
@@ -656,15 +656,15 @@ rspamd_mempool_delete (rspamd_mempool_t * pool)
}
if (cur) {
- pool->entry->elts[pool->entry->cur_elts].leftover +=
+ pool->entry->elts[pool->entry->cur_elts].leftover =
pool_chain_free (cur);
- }
- pool->entry->cur_elts = (pool->entry->cur_elts + 1) %
- G_N_ELEMENTS (pool->entry->elts);
+ pool->entry->cur_elts = (pool->entry->cur_elts + 1) %
+ G_N_ELEMENTS (pool->entry->elts);
- if (pool->entry->cur_elts == 0) {
- rspamd_mempool_adjust_entry (pool->entry);
+ if (pool->entry->cur_elts == 0) {
+ rspamd_mempool_adjust_entry (pool->entry);
+ }
}
/* Call all pool destructors */