From: Kevin McCarthy Date: Wed, 31 Oct 2018 19:19:56 +0000 (-0700) Subject: Always print mutt_buffer_pool_free() size debug output X-Git-Tag: 2019-10-25~485^2~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9a7ea5311b60bc908cb1a1e465afddcdcb430e74;p=neomutt Always print mutt_buffer_pool_free() size debug output So I can easily see the resulting size of the pool at the end of a run. --- diff --git a/mutt/buffer.c b/mutt/buffer.c index 20cb0a943..230d6161f 100644 --- a/mutt/buffer.c +++ b/mutt/buffer.c @@ -347,10 +347,9 @@ void mutt_buffer_pool_init(void) */ void mutt_buffer_pool_free(void) { - if (BufferPoolCount != BufferPoolLen) - { - mutt_debug(1, "Buffer pool leak: %zu/%zu\n", BufferPoolCount, BufferPoolLen); - } + mutt_debug(1, "mutt_buffer_pool_free: %zu of %zu returned to pool\n", + BufferPoolCount, BufferPoolLen); + while (BufferPoolCount) mutt_buffer_free(&BufferPool[--BufferPoolCount]); FREE(&BufferPool);