Re-acquire the node when reusing it while deleting dead nodes
When the node gets reused in the closeversion cleaning of the dead nodes because the write transaction hasn't been opened yet, it would lead to double call to qpznode_release() on the same node. This is ultimately leads to assertion failure because the reference counting on the erefs would go negative, but the cleaning code is not working as expected thus it went unnoticed.
This commit is contained in:
@@ -1597,6 +1597,10 @@ closeversion(dns_db_t *db, dns_dbversion_t **versionp,
|
||||
}
|
||||
}
|
||||
|
||||
if (next_changed == changed) {
|
||||
qpznode_acquire(qpdb, node DNS__DB_FLARG_PASS);
|
||||
}
|
||||
|
||||
qpznode_detach(&node);
|
||||
|
||||
NODE_UNLOCK(nlock, &nlocktype);
|
||||
|
||||
Reference in New Issue
Block a user