mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-08 17:52:10 -04: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:
parent
31560dce1a
commit
a3d0476d17
1 changed files with 1 additions and 10 deletions
|
|
@ -9149,16 +9149,7 @@ zone_sign(dns_zone_t *zone) {
|
|||
if (ALG(zone_keys[i]) == signing->algorithm &&
|
||||
dst_key_id(zone_keys[i]) == signing->keyid)
|
||||
{
|
||||
bool ksk = false;
|
||||
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]);
|
||||
}
|
||||
dst_key_free(&zone_keys[i]);
|
||||
continue;
|
||||
}
|
||||
zone_keys[j] = zone_keys[i];
|
||||
|
|
|
|||
Loading…
Reference in a new issue