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:
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* 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>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -2152,12 +2152,12 @@ query_addwildcardproof(ns_client_t *client, dns_db_t *db,
|
|||||||
if (result == DNS_R_NXDOMAIN)
|
if (result == DNS_R_NXDOMAIN)
|
||||||
query_addrrset(client, &fname, &rdataset, &sigrdataset,
|
query_addrrset(client, &fname, &rdataset, &sigrdataset,
|
||||||
dbuf, DNS_SECTION_AUTHORITY);
|
dbuf, DNS_SECTION_AUTHORITY);
|
||||||
else {
|
if (rdataset != NULL)
|
||||||
query_putrdataset(client, &rdataset);
|
query_putrdataset(client, &rdataset);
|
||||||
|
if (sigrdataset != NULL)
|
||||||
query_putrdataset(client, &sigrdataset);
|
query_putrdataset(client, &sigrdataset);
|
||||||
if (fname != NULL)
|
if (fname != NULL)
|
||||||
query_releasename(client, &fname);
|
query_releasename(client, &fname);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
odepth = dns_name_depth(dns_db_origin(db));
|
odepth = dns_name_depth(dns_db_origin(db));
|
||||||
@@ -2198,14 +2198,15 @@ query_addwildcardproof(ns_client_t *client, dns_db_t *db,
|
|||||||
*/
|
*/
|
||||||
if (result == ISC_R_SUCCESS && ispositive)
|
if (result == ISC_R_SUCCESS && ispositive)
|
||||||
break;
|
break;
|
||||||
if (result != DNS_R_NXDOMAIN) {
|
if (result == DNS_R_NXDOMAIN)
|
||||||
|
query_addrrset(client, &fname, &rdataset, &sigrdataset,
|
||||||
|
dbuf, DNS_SECTION_AUTHORITY);
|
||||||
|
if (rdataset != NULL)
|
||||||
query_putrdataset(client, &rdataset);
|
query_putrdataset(client, &rdataset);
|
||||||
|
if (sigrdataset != NULL)
|
||||||
query_putrdataset(client, &sigrdataset);
|
query_putrdataset(client, &sigrdataset);
|
||||||
|
if (fname != NULL)
|
||||||
query_releasename(client, &fname);
|
query_releasename(client, &fname);
|
||||||
continue;
|
|
||||||
}
|
|
||||||
query_addrrset(client, &fname, &rdataset, &sigrdataset,
|
|
||||||
dbuf, DNS_SECTION_AUTHORITY);
|
|
||||||
}
|
}
|
||||||
cleanup:
|
cleanup:
|
||||||
if (rdataset != NULL)
|
if (rdataset != NULL)
|
||||||
|
Reference in New Issue
Block a user