mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 05:28:00 +00:00
3761. [bug] Address dangling reference bug in dns_keytable_add.
[RT #35471]
This commit is contained in:
parent
98922b2b2b
commit
96c17c5ecb
3
CHANGES
3
CHANGES
@ -1,3 +1,6 @@
|
||||
3761. [bug] Address dangling reference bug in dns_keytable_add.
|
||||
[RT #35471]
|
||||
|
||||
3760. [bug] Improve SIT with native PKCS#11 and on Windows.
|
||||
[RT #35433]
|
||||
|
||||
|
@ -174,6 +174,7 @@ insert(dns_keytable_t *keytable, isc_boolean_t managed,
|
||||
for (k = node->data; k != NULL; k = k->next) {
|
||||
if (k->key == NULL) {
|
||||
k->key = *keyp;
|
||||
*keyp = NULL; /* transfer ownership */
|
||||
break;
|
||||
}
|
||||
if (dst_key_compare(k->key, *keyp) == ISC_TRUE)
|
||||
@ -182,7 +183,7 @@ insert(dns_keytable_t *keytable, isc_boolean_t managed,
|
||||
|
||||
if (k == NULL)
|
||||
result = ISC_R_SUCCESS;
|
||||
else
|
||||
else if (*keyp != NULL)
|
||||
dst_key_free(keyp);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user