From 30b652c9f33e050c674dc40b37b21902880dc35c Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Wed, 13 Oct 1999 02:08:19 +0000 Subject: [PATCH] improve post-recursion code --- bin/named/query.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/named/query.c b/bin/named/query.c index bf11aae044..71b0825ac4 100644 --- a/bin/named/query.c +++ b/bin/named/query.c @@ -1443,7 +1443,6 @@ query_find(ns_client_t *client, dns_fetchevent_t *event) { client->query.attributes &= ~NS_QUERYATTR_RECURSING; - result = event->result; qtype = event->type; if (qtype == dns_rdatatype_sig) type = dns_rdatatype_any; @@ -1474,7 +1473,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event) { goto cleanup; } - isc_event_free((isc_event_t **)(&event)); + result = event->result; goto resume; } else @@ -2117,6 +2116,8 @@ query_find(ns_client_t *client, dns_fetchevent_t *event) { query_releasename(client, &zfname); dns_db_detach(&zdb); } + if (event != NULL) + isc_event_free((isc_event_t **)(&event)); /* * AA bit.