2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

more: 3410. [bug] Addressed Coverity warnings. [RT #31626]

move set_refreshkeytimer call within loop so that keydata is valid.
This commit is contained in:
Mark Andrews
2012-10-30 13:00:58 +11:00
parent e7d8a61783
commit 16a2ddb2ce

View File

@@ -3106,6 +3106,8 @@ create_keydata(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
CHECK(update_one_rr(db, ver, diff, DNS_DIFFOP_ADD,
dst_key_name(key), 0, &rdata));
*changed = ISC_TRUE;
/* Refresh new keys from the zone apex as soon as possible. */
set_refreshkeytimer(zone, &keydata, now);
skip:
result = dns_keytable_nextkeynode(keytable, keynode, &nextnode);
@@ -3115,10 +3117,6 @@ create_keydata(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
}
}
/* Refresh new keys from the zone apex as soon as possible. */
if (*changed)
set_refreshkeytimer(zone, &keydata, now);
if (keynode != NULL)
dns_keytable_detachkeynode(keytable, &keynode);
*keynodep = NULL;