]> git.ipfire.org Git - thirdparty/bind9.git/commit
Add dns_rdataset_cleanup() that conditionally disassociate rdataset
authorOndřej Surý <ondrej@isc.org>
Wed, 17 Dec 2025 05:59:33 +0000 (06:59 +0100)
committerOndřej Surý <ondrej@isc.org>
Wed, 17 Dec 2025 14:19:55 +0000 (15:19 +0100)
commitcabe3aee3bd61d408f15eae2e6b9091ba6d54e32
tree2029849f870b2dde8ab08115af45fa892dc9143e
parentd00f69e4502f523da8694f2509ccfe3cafa793bf
Add dns_rdataset_cleanup() that conditionally disassociate rdataset

We had a common pattern in the code that looks like this:

if (dns_rdataset_isassociated(rdataset)) {
dns_rdataset_disassociate(rdataset);
}

add a helper macro that checks for rdataset != NULL and the above
called dns_rdataset_cleanup(rdataset).
lib/dns/include/dns/rdataset.h