From: Mark Andrews Date: Sun, 14 Mar 2004 22:53:39 +0000 (+0000) Subject: 1592. [bug] configure_view() could leak a dispatch. X-Git-Tag: v9.4.0~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3a09ca2497e925a9f0ba76f1525c6c60e5d5094;p=thirdparty%2Fbind9.git 1592. [bug] configure_view() could leak a dispatch. --- diff --git a/CHANGES b/CHANGES index d69ade8c0f5..76eeabcb82b 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 ed6e0b49157..8510567512a 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)