2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Change #1331 (Generate DNSSEC wildcard proofs) contained a memory leak.

This commit is contained in:
Mark Andrews
2002-07-23 03:33:12 +00:00
parent b907c35b33
commit edc944d166

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: query.c,v 1.225 2002/07/19 03:50:42 marka Exp $ */
/* $Id: query.c,v 1.226 2002/07/23 03:33:12 marka Exp $ */
#include <config.h>
@@ -2152,13 +2152,13 @@ query_addwildcardproof(ns_client_t *client, dns_db_t *db,
if (result == DNS_R_NXDOMAIN)
query_addrrset(client, &fname, &rdataset, &sigrdataset,
dbuf, DNS_SECTION_AUTHORITY);
else {
if (rdataset != NULL)
query_putrdataset(client, &rdataset);
if (sigrdataset != NULL)
query_putrdataset(client, &sigrdataset);
if (fname != NULL)
query_releasename(client, &fname);
}
}
odepth = dns_name_depth(dns_db_origin(db));
ndepth = dns_name_depth(client->query.qname);
@@ -2198,14 +2198,15 @@ query_addwildcardproof(ns_client_t *client, dns_db_t *db,
*/
if (result == ISC_R_SUCCESS && ispositive)
break;
if (result != DNS_R_NXDOMAIN) {
query_putrdataset(client, &rdataset);
query_putrdataset(client, &sigrdataset);
query_releasename(client, &fname);
continue;
}
if (result == DNS_R_NXDOMAIN)
query_addrrset(client, &fname, &rdataset, &sigrdataset,
dbuf, DNS_SECTION_AUTHORITY);
if (rdataset != NULL)
query_putrdataset(client, &rdataset);
if (sigrdataset != NULL)
query_putrdataset(client, &sigrdataset);
if (fname != NULL)
query_releasename(client, &fname);
}
cleanup:
if (rdataset != NULL)