3761. [bug] Address dangling reference bug in dns_keytable_add.
[RT #35471]
(cherry picked from commit 96c17c5ecb)
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
3761. [bug] Address dangling reference bug in dns_keytable_add.
|
||||
[RT #35471]
|
||||
|
||||
3757. [port] Enable Python tools (dnssec-coverage,
|
||||
dnssec-checkds) to run on Windows. [RT #34355]
|
||||
|
||||
|
||||
+2
-1
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user