]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2284. [bug] Memory leak in UPDATE prerequisite processing.
authorMark Andrews <marka@isc.org>
Wed, 2 Jan 2008 04:26:26 +0000 (04:26 +0000)
committerMark Andrews <marka@isc.org>
Wed, 2 Jan 2008 04:26:26 +0000 (04:26 +0000)
                        [RT #17377]

CHANGES
bin/named/update.c

diff --git a/CHANGES b/CHANGES
index 3cad1cb6ff61094153d5c63100c3cf4a72280700..ae5945b4a8a5fb369ef65cdf2235ea9753f8f719 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2284.  [bug]           Memory leak in UPDATE prerequisite processing.
+                       [RT #17377]
+
 2283.  [bug]           TSIG keys were not attaching to the memory
                        context.  TSIG keys should use the rings
                        memory context rather than the clients memory
index 4d60dcf3502ecb910b81e93fb2f8b421ac03d944..e1525a284087f3faff76bd0b4bf81d6a05a2d442 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: update.c,v 1.137 2007/08/28 00:05:06 marka Exp $ */
+/* $Id: update.c,v 1.138 2008/01/02 04:26:26 marka Exp $ */
 
 #include <config.h>
 
@@ -857,10 +857,14 @@ temp_check(isc_mem_t *mctx, dns_diff_t *temp, dns_db_t *db,
                /* A new unique name begins here. */
                node = NULL;
                result = dns_db_findnode(db, name, ISC_FALSE, &node);
-               if (result == ISC_R_NOTFOUND)
+               if (result == ISC_R_NOTFOUND) {
+                       dns_diff_clear(&trash);
                        return (DNS_R_NXRRSET);
-               if (result != ISC_R_SUCCESS)
+               }
+               if (result != ISC_R_SUCCESS) {
+                       dns_diff_clear(&trash);
                        return (result);
+               }
 
                /* A new unique type begins here. */
                while (t != NULL && dns_name_equal(&t->name, name)) {
@@ -888,6 +892,7 @@ temp_check(isc_mem_t *mctx, dns_diff_t *temp, dns_db_t *db,
                                                     &rdataset, NULL);
                        if (result != ISC_R_SUCCESS) {
                                dns_db_detachnode(db, &node);
+                               dns_diff_clear(&trash);
                                return (DNS_R_NXRRSET);
                        }