mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-08 21:32:11 -04:00
clean up security roots if TSIG key ring creation fails
This commit is contained in:
parent
8545bb4765
commit
9e565c950b
1 changed files with 4 additions and 1 deletions
|
|
@ -119,7 +119,7 @@ dns_view_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
|
|||
view->dynamickeys = NULL;
|
||||
result = dns_tsigkeyring_create(view->mctx, &view->dynamickeys);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
goto cleanup_zt;
|
||||
goto cleanup_secroots;
|
||||
ISC_LINK_INIT(view, link);
|
||||
ISC_EVENT_INIT(&view->resevent, sizeof view->resevent, 0, NULL,
|
||||
DNS_EVENT_VIEWRESSHUTDOWN, resolver_shutdown,
|
||||
|
|
@ -133,6 +133,9 @@ dns_view_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
|
|||
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
cleanup_secroots:
|
||||
dns_rbt_destroy(&view->secroots);
|
||||
|
||||
cleanup_zt:
|
||||
dns_zt_detach(&view->zonetable);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue