mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Fix parse_dnskey in bin/dnssec/dnssec-ksr.c was failing to reset comments
If dns_name_fromtext failed or the subsequent dns_name_compare
failed the lexer's comments state wasn't cleaned up.
(cherry picked from commit a949184eb7)
This commit is contained in:
parent
525d821e1a
commit
174355101e
1 changed files with 3 additions and 2 deletions
|
|
@ -1012,10 +1012,11 @@ parse_dnskey(isc_lex_t *lex, char *owner, isc_buffer_t *buf, dns_ttl_t *ttl) {
|
|||
isc_buffer_add(&b, strlen(owner));
|
||||
ret = dns_name_fromtext(dname, &b, dns_rootname, 0, NULL);
|
||||
if (ret != ISC_R_SUCCESS) {
|
||||
return ret;
|
||||
goto cleanup;
|
||||
}
|
||||
if (dns_name_compare(dname, name) != 0) {
|
||||
return DNS_R_BADOWNERNAME;
|
||||
ret = DNS_R_BADOWNERNAME;
|
||||
goto cleanup;
|
||||
}
|
||||
isc_buffer_clear(&b);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue