]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorMark Andrews <marka@isc.org>
Wed, 20 Mar 2002 22:51:43 +0000 (22:51 +0000)
committerMark Andrews <marka@isc.org>
Wed, 20 Mar 2002 22:51:43 +0000 (22:51 +0000)
lock mctx for DELETE_TRACE call in isc__mempool_put()

lib/isc/mem.c

index 1bd39b1f86f1e43c535194b9c3be3d39e0c3f2e5..431dc8c201155e6af9885c178f31e256ac9e08f5 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: mem.c,v 1.98.2.4 2002/02/08 03:57:39 marka Exp $ */
+/* $Id: mem.c,v 1.98.2.5 2002/03/20 22:51:43 marka Exp $ */
 
 #include <config.h>
 
@@ -1559,7 +1559,11 @@ isc__mempool_put(isc_mempool_t *mpctx, void *mem FLARG) {
        INSIST(mpctx->allocated > 0);
        mpctx->allocated--;
 
+#if ISC_MEM_TRACKLINES
+       LOCK(&mctx->lock);
        DELETE_TRACE(mctx, mem, mpctx->size, file, line);
+       UNLOCK(&mctx->lock);
+#endif /* ISC_MEM_TRACKLINES */
 
        /*
         * If our free list is full, return this to the mctx directly.