From 703dfde61b044a866875f6217cb34acf0ff298ac Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Wed, 11 Oct 2000 23:57:38 +0000 Subject: [PATCH] An out of memory error could cause an assertion. --- lib/dns/message.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/dns/message.c b/lib/dns/message.c index ee75d33f47..f6ac195ea5 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.150 2000/10/11 17:44:10 mws Exp $ */ +/* $Id: message.c,v 1.151 2000/10/11 23:57:38 bwelling Exp $ */ /*** *** Imports @@ -710,8 +710,10 @@ dns_message_create(isc_mem_t *mctx, unsigned int intent, dns_message_t **msgp) if (msgblock != NULL) msgblock_free(mctx, msgblock, sizeof(dns_rdata_t)); dynbuf = ISC_LIST_HEAD(m->scratchpad); - if (dynbuf != NULL) + if (dynbuf != NULL) { + ISC_LIST_UNLINK(m->scratchpad, dynbuf, link); isc_buffer_free(&dynbuf); + } if (m->namepool != NULL) isc_mempool_destroy(&m->namepool); if (m->rdspool != NULL)