mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
[9.20] fix: dev: don't use 'create' flag unnecessarily in findnode()
when searching the cache for a node so that we can delete an rdataset, it isn't necessary to set the 'create' flag. if the node doesn't exist yet, we won't be able to delete anything from it anyway. Backport of MR !9158 Merge branch 'backport-each-minor-findnode-refactor-9.20' into 'bind-9.20' See merge request isc-projects/bind9!9253
This commit is contained in:
commit
4281aaab45
1 changed files with 1 additions and 2 deletions
|
|
@ -5220,7 +5220,7 @@ validated(void *arg) {
|
|||
result = ISC_R_NOTFOUND;
|
||||
if (val->rdataset != NULL) {
|
||||
result = dns_db_findnode(fctx->cache, val->name,
|
||||
true, &node);
|
||||
false, &node);
|
||||
}
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
(void)dns_db_deleterdataset(fctx->cache, node,
|
||||
|
|
@ -5858,7 +5858,6 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, dns_message_t *message,
|
|||
/*
|
||||
* Find or create the cache node.
|
||||
*/
|
||||
node = NULL;
|
||||
result = dns_db_findnode(fctx->cache, name, true, &node);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return (result);
|
||||
|
|
|
|||
Loading…
Reference in a new issue