]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorAndreas Gustafsson <source@isc.org>
Tue, 13 Feb 2001 20:43:44 +0000 (20:43 +0000)
committerAndreas Gustafsson <source@isc.org>
Tue, 13 Feb 2001 20:43:44 +0000 (20:43 +0000)
Give more information when isc_mempool_destroy() dies with an assertion
failure, in the hope that we'll be able to fix the bug one day.

lib/isc/mem.c

index 28f5e59cca8e4a47312e7d722186ffeead752d9c..2587eb01cd148d49aded91942b5429d7462754b4 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: mem.c,v 1.75.2.1 2001/01/09 22:49:07 bwelling Exp $ */
+/* $Id: mem.c,v 1.75.2.2 2001/02/13 20:43:44 gson Exp $ */
 
 #include <config.h>
 
@@ -1401,6 +1401,13 @@ isc_mempool_destroy(isc_mempool_t **mpctxp) {
        REQUIRE(mpctxp != NULL);
        mpctx = *mpctxp;
        REQUIRE(VALID_MEMPOOL(mpctx));
+#if ISC_MEMPOOL_NAMES
+       if (mpctx->allocated > 0)
+               UNEXPECTED_ERROR(__FILE__, __LINE__,
+                                "isc_mempool_destroy(): mempool %s leaked "
+                                "memory.  Please report this error to "
+                                "bind9-bugs@isc.org", mpctx->name);
+#endif
        REQUIRE(mpctx->allocated == 0);
 
        mctx = mpctx->mctx;