]> git.ipfire.org Git - thirdparty/bind9.git/commit
[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)
commitb69bbf2e0edf17be5cb65b96bbc1b381c5f7adfb
treeb6555bd2e1a93ba0b22a6b814ded40908b8c1470
parenta2bedda1321645ce0e107daa46e5ba8552f23a55
parenta32a0d771bdc731e27840b5c3a9f746ac807c574
[9.20] fix: dev: Fix resquery reference imbalance on TCP connect failure

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