mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-22 10:10:14 -04:00
fix: nil: Fix parse_rr in lib/dns/skr.c was failing to reset the comments
If dns_name_fromtext failed or the subsequent dns_name_compare failed the lexer's comments state wasn't cleaned up. Closes #5564 Merge branch '5564-fix-bug-in-skr-c-parse_rr-on-error-path' into 'main' See merge request isc-projects/bind9!11088
This commit is contained in:
commit
d4527cb9e6
1 changed files with 3 additions and 2 deletions
|
|
@ -74,10 +74,11 @@ parse_rr(isc_lex_t *lex, isc_mem_t *mctx, char *owner, dns_name_t *origin,
|
|||
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, origin) != 0) {
|
||||
return DNS_R_BADOWNERNAME;
|
||||
ret = DNS_R_BADOWNERNAME;
|
||||
goto cleanup;
|
||||
}
|
||||
isc_buffer_clear(&b);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue