]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorMark Andrews <marka@isc.org>
Thu, 28 Mar 2002 05:10:09 +0000 (05:10 +0000)
committerMark Andrews <marka@isc.org>
Thu, 28 Mar 2002 05:10:09 +0000 (05:10 +0000)
1239.   [bug]           Under certain circumstances named could continue to
                        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 90ffa7a218e6679facefc9cd7c002b6d0d8e874d..8a6035b1e974c0cf1cb98c1f4bf3fd8de5ce6222 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+1239.  [bug]           Under certain circumstances named could continue to
+                       use a name after it had been freed triggering
+                       INSIST() failures.  [RT #2614]
 
        --- 9.2.1rc2 released ---
 
index 3408f34eeb48202b5dc749d3fdc9b40a9817c433..3d476e37e016fdafbcd9d9307ff56a7bd2ad5bdc 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: query.c,v 1.198.2.6 2002/02/08 03:57:12 marka Exp $ */
+/* $Id: query.c,v 1.198.2.7 2002/03/28 05:10:09 marka Exp $ */
 
 #include <config.h>
 
@@ -1815,8 +1815,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);
@@ -1834,7 +1833,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;