]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2882. [bug] Remove memory context from list of active contexts
authorMark Andrews <marka@isc.org>
Wed, 12 May 2010 00:46:55 +0000 (00:46 +0000)
committerMark Andrews <marka@isc.org>
Wed, 12 May 2010 00:46:55 +0000 (00:46 +0000)
                        before clearing 'magic'. [RT #21274]

CHANGES
lib/isc/mem.c

diff --git a/CHANGES b/CHANGES
index d70340ce78a1446a8d5ab4f8f78c664993e4ac66..e019a06643a659b5b74fb188959526dd7a6e70b2 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2882.  [bug]           Remove memory context from list of active contexts
+                       before clearing 'magic'. [RT #21274]
+
 2881.  [bug]           Reduce the amount of time the rbtdb write lock
                        is held when closing a version. [RT #21198]
 
index 5b11d08dcfb70268bb45d06f784c9c83e4e070a0..cefb3aeefb6f6b12c3c3669dc2ff7e65fe488202 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: mem.c,v 1.155 2010/03/04 23:50:34 tbox Exp $ */
+/* $Id: mem.c,v 1.156 2010/05/12 00:46:55 marka Exp $ */
 
 /*! \file */
 
@@ -1050,14 +1050,14 @@ destroy(isc__mem_t *ctx) {
        unsigned int i;
        isc_ondestroy_t ondest;
 
-       ctx->common.impmagic = 0;
-       ctx->common.magic = 0;
-
        LOCK(&lock);
        ISC_LIST_UNLINK(contexts, ctx, link);
        totallost += ctx->inuse;
        UNLOCK(&lock);
 
+       ctx->common.impmagic = 0;
+       ctx->common.magic = 0;
+
        INSIST(ISC_LIST_EMPTY(ctx->pools));
 
 #if ISC_MEM_TRACKLINES