]> git.ipfire.org Git - thirdparty/bind9.git/commit
Don't skip the counting if fcount_incr() is called with force==true (v2)
authorOndřej Surý <ondrej@isc.org>
Tue, 13 Aug 2024 10:48:23 +0000 (12:48 +0200)
committerOndřej Surý <ondrej@isc.org>
Tue, 13 Aug 2024 14:08:12 +0000 (16:08 +0200)
commitafb345b0e8a73c20264479282ac62ebaf6deb08f
treead460493600ec30ccadab46fde96fb73d1e01c38
parent085098c6fbe0c6e16d3676654777f32687eff402
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 8e86e55af19f70d056b3a8f651d75500534463f6)
lib/dns/resolver.c