]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1239. [bug] Under certain circumstances named could continue to
authorMark Andrews <marka@isc.org>
Thu, 28 Mar 2002 04:03:50 +0000 (04:03 +0000)
committerMark Andrews <marka@isc.org>
Thu, 28 Mar 2002 04:03:50 +0000 (04:03 +0000)
                        use a name after it had been freed triggering
                        INSIST() failures.  [RT #2614]

CHANGES
bin/named/query.c

diff --git a/CHANGES b/CHANGES
index c881ab3c99aead917913f20aff727af07dbc7844..c9c888ab3d9c82048b523fbe13cae6b61f2c9f75 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+1239.  [bug]           Under certain circumstances named could continue to
+                       use a name after it had been freed triggering
+                       INSIST() failures.  [RT #2614]
+
 1238.  [bug]           It is possible to lockup the server when shutting down
                        if notifies were being processed. [RT #2591]
 
index 8d9a50aba5dd2b1500913639ab77314472e911c6..d75a0060195be2596da10ce554063de6cd99c502 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: query.c,v 1.218 2002/03/07 13:46:38 marka Exp $ */
+/* $Id: query.c,v 1.219 2002/03/28 04:03:50 marka Exp $ */
 
 #include <config.h>
 
@@ -1843,8 +1843,7 @@ query_addcnamelike(ns_client_t *client, dns_name_t *qname, dns_name_t *tname,
        isc_region_t r;
 
        /*
-        * We assume the name data referred to by qname and tname won't
-        * go away.
+        * We assume the name data referred to by tname won't go away.
         */
 
        REQUIRE(anamep != NULL);
@@ -1862,7 +1861,11 @@ query_addcnamelike(ns_client_t *client, dns_name_t *qname, dns_name_t *tname,
        if (result != ISC_R_SUCCESS)
                return (result);
        dns_rdataset_init(rdataset);
-       dns_name_clone(qname, *anamep);
+       result = dns_name_dup(qname, client->mctx, *anamep);
+       if (result != ISC_R_SUCCESS) {
+               dns_message_puttemprdataset(client->message, &rdataset);
+               return (result);
+       }
 
        rdatalist->type = type;
        rdatalist->covers = 0;