From: Mark Andrews Date: Fri, 31 May 2013 02:31:01 +0000 (+1000) Subject: address memory in dns_view_getsecroots failure X-Git-Tag: v9.10.0a1~319 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=c611465739500968dd757ccb5a8abc13b4fcf56b;p=thirdparty%2Fbind9.git address memory in dns_view_getsecroots failure --- diff --git a/lib/dns/validator.c b/lib/dns/validator.c index 2f4671b8f6a..228ae87064e 100644 --- a/lib/dns/validator.c +++ b/lib/dns/validator.c @@ -3748,8 +3748,7 @@ dns_validator_create(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type, val->keytable = NULL; result = dns_view_getsecroots(val->view, &val->keytable); if (result != ISC_R_SUCCESS) - return (result); - + goto cleanup_mutex; val->keynode = NULL; val->key = NULL; val->siginfo = NULL; @@ -3782,6 +3781,9 @@ dns_validator_create(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type, return (ISC_R_SUCCESS); + cleanup_mutex: + DESTROYLOCK(&val->lock); + cleanup_event: isc_task_detach(&tclone); isc_event_free(ISC_EVENT_PTR(&event));