mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
destroy() did not free TSIG keys; result from dns_tsig_init()
was not checked
This commit is contained in:
@@ -110,6 +110,8 @@ dns_view_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
|
||||
view->statickeys = NULL;
|
||||
view->dynamickeys = NULL;
|
||||
result = dns_tsig_init(NULL, view->mctx, &view->dynamickeys);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
goto cleanup_zt;
|
||||
ISC_LINK_INIT(view, link);
|
||||
ISC_EVENT_INIT(&view->resevent, sizeof view->resevent, 0, NULL,
|
||||
DNS_EVENT_VIEWRESSHUTDOWN, resolver_shutdown,
|
||||
@@ -166,6 +168,10 @@ destroy(dns_view_t *view) {
|
||||
REQUIRE(RESSHUTDOWN(view));
|
||||
REQUIRE(ADBSHUTDOWN(view));
|
||||
|
||||
if (view->dynamickeys != NULL)
|
||||
dns_tsig_destroy(&view->dynamickeys);
|
||||
if (view->statickeys != NULL)
|
||||
dns_tsig_destroy(&view->statickeys);
|
||||
if (view->adb != NULL)
|
||||
dns_adb_detach(&view->adb);
|
||||
if (view->resolver != NULL)
|
||||
|
Reference in New Issue
Block a user