2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

dns_db_setloop called at wrong place on wrong db

In cache_create_db, dns_db_setloop should be called on the newly
created db only if the database creation succeeded.
This commit is contained in:
Mark Andrews
2024-03-07 13:10:23 +11:00
parent cc12a60a6c
commit 926d2e4cf2

View File

@@ -101,10 +101,9 @@ cache_create_db(dns_cache_t *cache, dns_db_t **db) {
if (result == ISC_R_SUCCESS) {
dns_db_setservestalettl(*db, cache->serve_stale_ttl);
dns_db_setservestalerefresh(*db, cache->serve_stale_refresh);
dns_db_setloop(*db, cache->loop);
}
dns_db_setloop(cache->db, cache->loop);
return (result);
}