double unlock on dns_db_newversion failure in zone.c
lib/dns/zone.c:
20483 if (zone->db != NULL) {
20484 dns_db_attach(zone->db, &db);
20485 }
4. unlock: isc_rwlock_unlock unlocks zone->dblock.rwlock. [show details]
5. Condition !!(isc_rwlock_unlock(&zone->dblock, isc_rwlocktype_read) == 0), taking true branch.
6. Condition !!(isc_rwlock_unlock(&zone->dblock, isc_rwlocktype_read) == 0), taking true branch.
20486 ZONEDB_UNLOCK(&zone->dblock, isc_rwlocktype_read);
7. Condition db == NULL, taking false branch.
20487 if (db == NULL) {
20488 goto failure;
20489 }
20490
20491 dns_db_currentversion(db, &oldver);
20492 result = dns_db_newversion(db, &newver);
8. Condition result != 0, taking true branch.
20493 if (result != ISC_R_SUCCESS) {
CID 288540 (#1 of 1): Double unlock (LOCK)
9. double_unlock: isc_rwlock_unlock unlocks zone->dblock.rwlock while it is unlocked.
20494 ZONEDB_UNLOCK(&zone->dblock, isc_rwlocktype_read);
20495 dnssec_log(zone, ISC_LOG_ERROR,
20496 "setnsec3param:dns_db_newversion -> %s",
20497 dns_result_totext(result));
20498 goto failure;
20499 }