From: Brian Wellington Date: Wed, 11 Oct 2000 23:57:38 +0000 (+0000) Subject: An out of memory error could cause an assertion. X-Git-Tag: v9.0.1^4~67 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=703dfde61b044a866875f6217cb34acf0ff298ac;p=thirdparty%2Fbind9.git An out of memory error could cause an assertion. --- diff --git a/lib/dns/message.c b/lib/dns/message.c index ee75d33f47a..f6ac195ea5c 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)