From b270a97754aef2bf3a850e661816f7776387b74d Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Sun, 18 Feb 2001 05:56:16 +0000 Subject: [PATCH] Fix a case where the client could theoretically not free a temporary name. It'll never happen, since dns_rdata_tostruct() cannot fail when passed a NULL mctx, but it's more correct this way. --- bin/named/query.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/named/query.c b/bin/named/query.c index c94d86855f..732bfd2c06 100644 --- a/bin/named/query.c +++ b/bin/named/query.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: query.c,v 1.181 2001/02/14 19:32:30 gson Exp $ */ +/* $Id: query.c,v 1.182 2001/02/18 05:56:16 bwelling Exp $ */ #include @@ -2892,8 +2892,10 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype) dns_rdataset_current(trdataset, &rdata); result = dns_rdata_tostruct(&rdata, &cname, NULL); dns_rdata_reset(&rdata); - if (result != ISC_R_SUCCESS) + if (result != ISC_R_SUCCESS) { + dns_message_puttempname(client->message, &tname); goto cleanup; + } dns_name_init(tname, NULL); dns_name_clone(&cname.cname, tname); dns_rdata_freestruct(&cname);