2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 05:57:52 +00:00

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.
This commit is contained in:
Brian Wellington 2001-02-18 05:56:16 +00:00
parent e6743c1b25
commit b270a97754

View File

@ -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 <config.h>
@ -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);