From: Brian Wellington Date: Fri, 13 Oct 2000 23:21:17 +0000 (+0000) Subject: The changes in #515 leaked memory and left dead code. X-Git-Tag: v9.0.1^4~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54477d367bb80484ba8e9ca4eac43c0c317d4968;p=thirdparty%2Fbind9.git The changes in #515 leaked memory and left dead code. --- diff --git a/bin/named/update.c b/bin/named/update.c index 6df5bbc7a29..53fd1fbb313 100644 --- a/bin/named/update.c +++ b/bin/named/update.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: update.c,v 1.65 2000/09/29 03:25:23 marka Exp $ */ +/* $Id: update.c,v 1.66 2000/10/13 23:21:17 bwelling Exp $ */ #include @@ -2374,6 +2374,9 @@ update_action(isc_task_t *task, isc_event_t *event) { if (db != NULL) dns_db_detach(&db); + if (ssutable != NULL) + dns_ssutable_detach(&ssutable); + if (zone != NULL) dns_zone_detach(&zone); diff --git a/bin/named/zoneconf.c b/bin/named/zoneconf.c index ed22184f5e9..d6f9fd57aee 100644 --- a/bin/named/zoneconf.c +++ b/bin/named/zoneconf.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: zoneconf.c,v 1.61 2000/08/29 03:48:00 marka Exp $ */ +/* $Id: zoneconf.c,v 1.62 2000/10/13 23:21:16 bwelling Exp $ */ #include @@ -342,15 +342,9 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview, dns_zone_setupdateacl, dns_zone_clearupdateacl)); - dns_zone_getssutable(zone, &ssutable); - if (ssutable != NULL) - dns_ssutable_detach(&ssutable); result = dns_c_zone_getssuauth(czone, &ssutable); - if (result == ISC_R_SUCCESS) { - dns_ssutable_t *newssutable = NULL; - dns_ssutable_attach(ssutable, &newssutable); - dns_zone_setssutable(zone, newssutable); - } + if (result == ISC_R_SUCCESS) + dns_zone_setssutable(zone, ssutable); result = dns_c_zone_getsigvalidityinterval(czone, &uintval); if (result != ISC_R_SUCCESS && cview != NULL) diff --git a/lib/dns/zoneconf.c b/lib/dns/zoneconf.c index ed22184f5e9..d6f9fd57aee 100644 --- a/lib/dns/zoneconf.c +++ b/lib/dns/zoneconf.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: zoneconf.c,v 1.61 2000/08/29 03:48:00 marka Exp $ */ +/* $Id: zoneconf.c,v 1.62 2000/10/13 23:21:16 bwelling Exp $ */ #include @@ -342,15 +342,9 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview, dns_zone_setupdateacl, dns_zone_clearupdateacl)); - dns_zone_getssutable(zone, &ssutable); - if (ssutable != NULL) - dns_ssutable_detach(&ssutable); result = dns_c_zone_getssuauth(czone, &ssutable); - if (result == ISC_R_SUCCESS) { - dns_ssutable_t *newssutable = NULL; - dns_ssutable_attach(ssutable, &newssutable); - dns_zone_setssutable(zone, newssutable); - } + if (result == ISC_R_SUCCESS) + dns_zone_setssutable(zone, ssutable); result = dns_c_zone_getsigvalidityinterval(czone, &uintval); if (result != ISC_R_SUCCESS && cview != NULL)