A typo in commit
d39ab7440e introduced a bug in zone database reference
counting which leads to a crash if dumping one version of a slave zone
is not finished by the time transferring a newer version from a master
completes. Correct the typo to fix reference counting, thus preventing
crashes.
dns_db_t *zdb = NULL;
if (dns_zone_getdb(zone, &zdb) == ISC_R_SUCCESS) {
zone_journal_compact(zone, zdb, serial);
- dns_db_detach(&db);
+ dns_db_detach(&zdb);
}
} else if (tresult == ISC_R_SUCCESS) {
compact = ISC_TRUE;