Commit dc0ecf08 authored by Mark Andrews's avatar Mark Andrews
Browse files

2284. [bug] Memory leak in UPDATE prerequisite processing.

                        [RT #17377]
parent dc19dcbc
2284. [bug] Memory leak in UPDATE prerequisite processing.
[RT #17377]
2283. [bug] TSIG keys were not attaching to the memory 2283. [bug] TSIG keys were not attaching to the memory
context. TSIG keys should use the rings context. TSIG keys should use the rings
memory context rather than the clients memory memory context rather than the clients memory
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE. * 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> #include <config.h>
...@@ -857,10 +857,14 @@ temp_check(isc_mem_t *mctx, dns_diff_t *temp, dns_db_t *db, ...@@ -857,10 +857,14 @@ temp_check(isc_mem_t *mctx, dns_diff_t *temp, dns_db_t *db,
/* A new unique name begins here. */ /* A new unique name begins here. */
node = NULL; node = NULL;
result = dns_db_findnode(db, name, ISC_FALSE, &node); 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); return (DNS_R_NXRRSET);
if (result != ISC_R_SUCCESS) }
if (result != ISC_R_SUCCESS) {
dns_diff_clear(&trash);
return (result); return (result);
}
/* A new unique type begins here. */ /* A new unique type begins here. */
while (t != NULL && dns_name_equal(&t->name, name)) { 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, ...@@ -888,6 +892,7 @@ temp_check(isc_mem_t *mctx, dns_diff_t *temp, dns_db_t *db,
&rdataset, NULL); &rdataset, NULL);
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {
dns_db_detachnode(db, &node); dns_db_detachnode(db, &node);
dns_diff_clear(&trash);
return (DNS_R_NXRRSET); return (DNS_R_NXRRSET);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment