]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[9.20] fix: dev: Fix resquery reference imbalance on TCP connect failure
authorOndřej Surý <ondrej@isc.org>
Sun, 15 Mar 2026 03:33:44 +0000 (04:33 +0100)
committerOndřej Surý <ondrej@isc.org>
Sun, 15 Mar 2026 03:33:44 +0000 (04:33 +0100)
In fctx_query(), resquery_ref(query) is called before
dns_dispatch_connect() in anticipation of the resquery_connected()
callback consuming the reference.  When dns_dispatch_connect() fails
synchronously on TCP (e.g. from dns_transport_get_tlsctx() failing
in tcp_dispatch_connect()), the connect callback is never scheduled,
so the extra reference is never consumed.  This has been fixed.

Backport of MR !11640

Merge branch 'backport-ondrej/fix-resquery-refcount-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11656


Trivial merge