Commit d7e8610d authored by Mark Andrews's avatar Mark Andrews
Browse files

2270. [bug] dns_db_closeversion() version->writer could be reset

                        before it is tested. [RT #17290]
parent 7e821419
2270. [bug] dns_db_closeversion() version->writer could be reset
before it is tested. [RT #17290]
2269. [contrib] dbus memory leaks and missing va_end calls. [RT #17232] 2269. [contrib] dbus memory leaks and missing va_end calls. [RT #17232]
2268. [bug] 0.IN-ADDR.ARPA was missing from the empty zones 2268. [bug] 0.IN-ADDR.ARPA was missing from the empty zones
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: rbtdb.c,v 1.247 2007/10/19 17:15:53 explorer Exp $ */ /* $Id: rbtdb.c,v 1.248 2007/12/02 20:27:35 marka Exp $ */
/*! \file */ /*! \file */
...@@ -1751,6 +1751,7 @@ closeversion(dns_db_t *db, dns_dbversion_t **versionp, isc_boolean_t commit) { ...@@ -1751,6 +1751,7 @@ closeversion(dns_db_t *db, dns_dbversion_t **versionp, isc_boolean_t commit) {
rbtdb_serial_t serial, least_serial; rbtdb_serial_t serial, least_serial;
dns_rbtnode_t *rbtnode; dns_rbtnode_t *rbtnode;
unsigned int refs; unsigned int refs;
isc_boolean_t writer;
REQUIRE(VALID_RBTDB(rbtdb)); REQUIRE(VALID_RBTDB(rbtdb));
version = (rbtdb_version_t *)*versionp; version = (rbtdb_version_t *)*versionp;
...@@ -1770,6 +1771,7 @@ closeversion(dns_db_t *db, dns_dbversion_t **versionp, isc_boolean_t commit) { ...@@ -1770,6 +1771,7 @@ closeversion(dns_db_t *db, dns_dbversion_t **versionp, isc_boolean_t commit) {
RBTDB_LOCK(&rbtdb->lock, isc_rwlocktype_write); RBTDB_LOCK(&rbtdb->lock, isc_rwlocktype_write);
serial = version->serial; serial = version->serial;
writer = version->writer;
if (version->writer) { if (version->writer) {
if (commit) { if (commit) {
unsigned cur_ref; unsigned cur_ref;
...@@ -1902,7 +1904,7 @@ closeversion(dns_db_t *db, dns_dbversion_t **versionp, isc_boolean_t commit) { ...@@ -1902,7 +1904,7 @@ closeversion(dns_db_t *db, dns_dbversion_t **versionp, isc_boolean_t commit) {
/* /*
* Update the zone's secure status. * Update the zone's secure status.
*/ */
if (version->writer && commit && !IS_CACHE(rbtdb)) if (writer && commit && !IS_CACHE(rbtdb))
rbtdb->secure = iszonesecure(db, rbtdb->origin_node); rbtdb->secure = iszonesecure(db, rbtdb->origin_node);
if (cleanup_version != NULL) { if (cleanup_version != NULL) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment