An out of memory error could cause an assertion.

This commit is contained in:
Brian Wellington
2000-10-11 23:57:38 +00:00
parent b2e6eb8cea
commit 703dfde61b

View 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)