From: Mark Andrews Date: Sun, 14 Mar 2004 22:52:16 +0000 (+0000) Subject: 1592. [bug] configure_view() could leak a dispatch. X-Git-Tag: v9.2.4rc1~13 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=a2f0a8f3d7f97ef463f10d6178805934fb572b40;p=thirdparty%2Fbind9.git 1592. [bug] configure_view() could leak a dispatch. --- diff --git a/CHANGES b/CHANGES index 0c9f398e3f9..abb61222783 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 3a0c6acc68c..5a8a67b48d6 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: server.c,v 1.339.2.23 2004/03/09 06:09:19 marka Exp $ */ +/* $Id: server.c,v 1.339.2.24 2004/03/14 22:52:16 marka Exp $ */ #include @@ -678,10 +678,6 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig, ns_g_socketmgr, ns_g_timermgr, 0, ns_g_dispatchmgr, dispatch4, dispatch6)); - if (dispatch4 != NULL) - dns_dispatch_detach(&dispatch4); - if (dispatch6 != NULL) - dns_dispatch_detach(&dispatch6); /* * Set resolver's lame-ttl. @@ -937,6 +933,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 (cmctx != NULL) isc_mem_detach(&cmctx);