mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
fix: nil: 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. Closes #5581 Merge branch '5581-parse_dnskey-in-lib-dns-skr-c-was-failing-to-reset-comments' into 'main' See merge request isc-projects/bind9!11109
This commit is contained in:
commit
2ffb16c436
1 changed files with 3 additions and 2 deletions
|
|
@ -986,10 +986,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);
|
||||
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