From 4efe32b8bb512ac03a139b77f008600c5a3624ea Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 3 Oct 2003 02:19:31 +0000 Subject: [PATCH] 1521. [bug] dns_view_createresolver() failed to check the result from isc_mem_create(). [RT# 9294] --- CHANGES | 3 +++ lib/dns/view.c | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 79d871f08d..57ed54e9f3 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +1521. [bug] dns_view_createresolver() failed to check the + result from isc_mem_create(). [RT# 9294] + 1520. [protocol] Add SSHFP (SSH Finger Print) type. 1519. [bug] dnssec-signzone:nsec_setbit() computed the wrong diff --git a/lib/dns/view.c b/lib/dns/view.c index 16db471416..11e61bfcab 100644 --- a/lib/dns/view.c +++ b/lib/dns/view.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: view.c,v 1.122 2003/09/30 05:56:14 marka Exp $ */ +/* $Id: view.c,v 1.123 2003/10/03 02:19:31 marka Exp $ */ #include @@ -542,7 +542,12 @@ dns_view_createresolver(dns_view_t *view, dns_resolver_whenshutdown(view->resolver, view->task, &event); view->attributes &= ~DNS_VIEWATTR_RESSHUTDOWN; - isc_mem_create(0, 0, &mctx); + result = isc_mem_create(0, 0, &mctx); + if (result != ISC_R_SUCCESS) { + dns_resolver_shutdown(view->resolver); + return (result); + } + result = dns_adb_create(mctx, view, timermgr, taskmgr, &view->adb); isc_mem_detach(&mctx); if (result != ISC_R_SUCCESS) {