]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
address memory in dns_view_getsecroots failure
authorMark Andrews <marka@isc.org>
Fri, 31 May 2013 02:31:01 +0000 (12:31 +1000)
committerMark Andrews <marka@isc.org>
Fri, 31 May 2013 02:31:01 +0000 (12:31 +1000)
lib/dns/validator.c

index 2f4671b8f6a34c6555a7fbc4ae14de9a7c741f2e..228ae87064e66c60b8abe6ab71259410f611939e 100644 (file)
@@ -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));