]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
An out of memory error could cause an assertion.
authorBrian Wellington <source@isc.org>
Wed, 11 Oct 2000 23:57:38 +0000 (23:57 +0000)
committerBrian Wellington <source@isc.org>
Wed, 11 Oct 2000 23:57:38 +0000 (23:57 +0000)
lib/dns/message.c

index ee75d33f47a440798b2a1907d7523db58c174faa..f6ac195ea5cc35a5afab8b683206839af77c3ef4 100644 (file)
@@ -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)