Merge branch '4054-zone_resigninc-bugfix' into 'main'

zone_resigninc(): check whether zone->db is a valid pointer before attaching

Closes #4054

See merge request isc-projects/bind9!7914
This commit is contained in:
Arаm Sаrgsyаn 2023-05-12 13:37:46 +00:00
commit 7a2784addd
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,6 @@
6169. [bug] named could crash when deleting inline-signing zones
with "rndc delzone". [GL #4054]
6168. [func] Refactor the glue cache to store list of the GLUE
directly in the rdatasetheader instead of keeping
it in the hashtable indexed by the node pointer.

View file

@ -6825,8 +6825,14 @@ zone_resigninc(dns_zone_t *zone) {
}
ZONEDB_LOCK(&zone->dblock, isc_rwlocktype_read);
dns_db_attach(zone->db, &db);
if (zone->db != NULL) {
dns_db_attach(zone->db, &db);
}
ZONEDB_UNLOCK(&zone->dblock, isc_rwlocktype_read);
if (db == NULL) {
result = ISC_R_FAILURE;
goto failure;
}
result = dns_db_newversion(db, &version);
if (result != ISC_R_SUCCESS) {