mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 07:40:00 -04:00
Don't skip the counting if fcount_incr() is called with force==true (v2)
The fcount_incr() was not increasing counter->count when force was set
to true, but fcount_decr() would try to decrease the counter leading to
underflow and assertion failure. Swap the order of the arguments in the
condition, so the !force is evaluated after incrementing the .count.
(cherry picked from commit 8e86e55af1)
This commit is contained in:
parent
085098c6fb
commit
afb345b0e8
1 changed files with 1 additions and 1 deletions
|
|
@ -1487,7 +1487,7 @@ fcount_incr(fetchctx_t *fctx, bool force) {
|
|||
|
||||
INSIST(spill > 0);
|
||||
LOCK(&counter->lock);
|
||||
if (!force && ++counter->count > spill) {
|
||||
if (++counter->count > spill && !force) {
|
||||
counter->count--;
|
||||
INSIST(counter->count > 0);
|
||||
counter->dropped++;
|
||||
|
|
|
|||
Loading…
Reference in a new issue