]> git.ipfire.org Git - thirdparty/bind9.git/commit
Tidy up cleanup path in check_signer()
authorOndřej Surý <ondrej@sury.org>
Fri, 10 Apr 2026 16:25:18 +0000 (18:25 +0200)
committerOndřej Surý <ondrej@sury.org>
Tue, 5 May 2026 05:43:15 +0000 (07:43 +0200)
commit19f44a0aa376bace89d8ffaece546e1fc891a763
treede32414841fefca97b6955c31fe0bd8691764f45
parenta812bc52eb566be8cd5f5c962521da53be2654ad
Tidy up cleanup path in check_signer()

The cloned signature rdataset was not disassociated on the early
return taken when dns_dnssec_keyfromrdata() fails to parse the DNSKEY
public-key data.  In every current caller val->sigrdataset reaches
check_signer() rdatalist-backed, so dns_rdataset_clone() copies the
struct without taking any reference and dns_rdataset_disassociate()
is a no-op -- no memory is actually leaked today.  Hoist the key
parse out of the per-RRSIG loop and let the function fall through
to a single cleanup path, so the parse and the iteration cannot
diverge again.

Assisted-by: Claude:claude-opus-4-7
lib/dns/validator.c