diff --git a/CHANGES b/CHANGES index d69ade8c0f..76eeabcb82 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +1592. [bug] configure_view() could leak a dispatch. + 1591. [bug] libbind: updated to BIND 8.4.5. 1590. [port] netbsd: update thread support. diff --git a/bin/named/server.c b/bin/named/server.c index ed6e0b4915..8510567512 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: server.c,v 1.417 2004/03/10 02:19:52 marka Exp $ */ +/* $Id: server.c,v 1.418 2004/03/14 22:53:39 marka Exp $ */ #include @@ -843,10 +843,6 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig, ns_g_socketmgr, ns_g_timermgr, check, ns_g_dispatchmgr, dispatch4, dispatch6)); - if (dispatch4 != NULL) - dns_dispatch_detach(&dispatch4); - if (dispatch6 != NULL) - dns_dispatch_detach(&dispatch6); /* * Set the ADB cache size to 1/8th of the max-cache-size. @@ -1201,6 +1197,10 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig, result = ISC_R_SUCCESS; cleanup: + if (dispatch4 != NULL) + dns_dispatch_detach(&dispatch4); + if (dispatch6 != NULL) + dns_dispatch_detach(&dispatch6); if (order != NULL) dns_order_detach(&order); if (cmctx != NULL)