From: Remi Gacogne Date: Tue, 20 Jun 2017 15:09:56 +0000 (+0200) Subject: Remove just enough entries from the cache, not one more than asked X-Git-Tag: rec-4.1.0-alpha1~46^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a4cb110e667bc3650dc3710e0b186b6fea5ea41;p=thirdparty%2Fpdns.git Remove just enough entries from the cache, not one more than asked (cherry picked from commit f3cb7c78abe3ad639d4583880ae9302b3be99a9e) --- diff --git a/pdns/cachecleaner.hh b/pdns/cachecleaner.hh index 955757876e..1d80b1740c 100644 --- a/pdns/cachecleaner.hh +++ b/pdns/cachecleaner.hh @@ -62,7 +62,7 @@ template void pruneCollection(C& container, T& collecti else ++iter; - if(toTrim && erased > toTrim) + if(toTrim && erased >= toTrim) break; }