]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2589. [bug] dns_db_unregister() failed to clear '*dbimp'.
authorMark Andrews <marka@isc.org>
Wed, 29 Apr 2009 22:11:34 +0000 (22:11 +0000)
committerMark Andrews <marka@isc.org>
Wed, 29 Apr 2009 22:11:34 +0000 (22:11 +0000)
                        [RT #19626]

CHANGES
lib/dns/db.c

diff --git a/CHANGES b/CHANGES
index 4d9925844172325a7b97345aa3c3475d54d321ed..ca9bb5a9c06c9c935b95cea336d10ba1772704e4 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2589.  [bug]           dns_db_unregister() failed to clear '*dbimp'.
+                       [RT #19626]
+
 2588.  [bug]           SO_REUSEADDR could be set unconditionally after failure
                        of bind(2) call.  This should be rare and mostly
                        harmless, but may cause interference with other
index a4c28641701fb9a80166a89e40d3ca27cb5205a7..f5081647aa43125745884e83f92bae6d1e6502f0 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: db.c,v 1.88 2008/09/24 02:46:22 marka Exp $ */
+/* $Id: db.c,v 1.89 2009/04/29 22:11:34 marka Exp $ */
 
 /*! \file */
 
@@ -854,12 +854,14 @@ dns_db_unregister(dns_dbimplementation_t **dbimp) {
        RUNTIME_CHECK(isc_once_do(&once, initialize) == ISC_R_SUCCESS);
 
        imp = *dbimp;
+       *dbimp = NULL;
        RWLOCK(&implock, isc_rwlocktype_write);
        ISC_LIST_UNLINK(implementations, imp, link);
        mctx = imp->mctx;
        isc_mem_put(mctx, imp, sizeof(dns_dbimplementation_t));
        isc_mem_detach(&mctx);
        RWUNLOCK(&implock, isc_rwlocktype_write);
+       ENSURE(*dbimp == NULL);
 }
 
 isc_result_t