mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-02 23:55:27 +00:00
Don't look for KSK status here and squash memory leak
Just remove the key from consideration as it is being removed. The old code could leak a key reference as dst_free_key was not called every time we continued. This simplification will address this as well.
This commit is contained in:
@@ -9149,16 +9149,7 @@ zone_sign(dns_zone_t *zone) {
|
|||||||
if (ALG(zone_keys[i]) == signing->algorithm &&
|
if (ALG(zone_keys[i]) == signing->algorithm &&
|
||||||
dst_key_id(zone_keys[i]) == signing->keyid)
|
dst_key_id(zone_keys[i]) == signing->keyid)
|
||||||
{
|
{
|
||||||
bool ksk = false;
|
dst_key_free(&zone_keys[i]);
|
||||||
isc_result_t ret = dst_key_getbool(
|
|
||||||
zone_keys[i], DST_BOOL_KSK,
|
|
||||||
&ksk);
|
|
||||||
if (ret != ISC_R_SUCCESS) {
|
|
||||||
ksk = KSK(zone_keys[i]);
|
|
||||||
}
|
|
||||||
if (ksk) {
|
|
||||||
dst_key_free(&zone_keys[i]);
|
|
||||||
}
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
zone_keys[j] = zone_keys[i];
|
zone_keys[j] = zone_keys[i];
|
||||||
|
Reference in New Issue
Block a user