From 3bd43bb300ca4b65602bcffcbd321865d4f18db9 Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Sun, 18 Feb 2001 23:46:26 +0000 Subject: [PATCH] ENSURE that a message's memory pools don't have any allocated data at the end of msgreset(). This should trigger the mpctx->allocated != 0 assertion when the leak occurs, not at server shutdown. --- lib/dns/message.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/dns/message.c b/lib/dns/message.c index f07c55534e..818b459326 100644 --- a/lib/dns/message.c +++ b/lib/dns/message.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: message.c,v 1.178 2001/02/15 19:09:55 gson Exp $ */ +/* $Id: message.c,v 1.179 2001/02/18 23:46:26 bwelling Exp $ */ /*** *** Imports @@ -628,6 +628,9 @@ msgreset(dns_message_t *msg, isc_boolean_t everything) { */ if (!everything) msginit(msg); + + ENSURE(isc_mempool_getallocated(msg->namepool) == 0); + ENSURE(isc_mempool_getallocated(msg->rdspool) == 0); } static unsigned int