1739. [bug] dns_rbt_deletetree() could incorrectly return

ISC_R_QUOTA.  [RT #12695]

1738.   [bug]           Enable overrun checking by default. [RT #12695]
This commit is contained in:
Mark Andrews 2004-10-11 05:55:51 +00:00
parent c0250728f0
commit 0621dbd390
4 changed files with 18 additions and 12 deletions

View file

@ -1,3 +1,8 @@
1739. [bug] dns_rbt_deletetree() could incorrectly return
ISC_R_QUOTA. [RT #12695]
1738. [bug] Enable overrun checking by default. [RT #12695]
1737. [bug] named failed if more than 16 masters were specified.
[RT #12627]

View file

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rbt.h,v 1.55.12.5 2004/03/08 09:04:38 marka Exp $ */
/* $Id: rbt.h,v 1.55.12.6 2004/10/11 05:55:51 marka Exp $ */
#ifndef DNS_RBT_H
#define DNS_RBT_H 1
@ -603,15 +603,18 @@ dns_rbt_destroy(dns_rbt_t **rbtp);
isc_result_t
dns_rbt_destroy2(dns_rbt_t **rbtp, unsigned int quantum);
/*
* Stop working with a red-black tree of trees. Once dns_rbt_destroy2()
* has been called on a 'rbt' only dns_rbt_destroy() or dns_rbt_destroy2()
* may be used on the tree. If 'quantum' is zero then the entire tree will
* be destroyed.
*
* Stop working with a red-black tree of trees.
* If 'quantum' is zero then the entire tree will be destroyed.
* If 'quantum' is non zero then up to 'quantum' nodes will be destroyed
* allowing the rbt to be incrementally destroyed by repeated calls to
* dns_rbt_destroy2(). Once dns_rbt_destroy2() has been called no other
* operations than dns_rbt_destroy()/dns_rbt_destroy2() should be
* performed on the tree of trees.
*
* Requires:
* *rbt is a valid rbt manager.
*
* Ensures:
* Ensures on ISC_R_SUCCESS:
* All space allocated by the RBT library has been returned.
*
* *rbt is invalidated as an rbt manager.

View file

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rbt.c,v 1.115.2.2.2.9 2004/03/08 21:06:27 marka Exp $ */
/* $Id: rbt.c,v 1.115.2.2.2.10 2004/10/11 05:55:50 marka Exp $ */
/* Principal Authors: DCL */
@ -2021,8 +2021,6 @@ dns_rbt_deletetree(dns_rbt_t *rbt, dns_rbtnode_t *node) {
done:
if (result != ISC_R_SUCCESS)
return (result);
if (rbt->quantum != 0 && --rbt->quantum == 0)
return (ISC_R_QUOTA);
if (DATA(node) != NULL && rbt->data_deleter != NULL)
rbt->data_deleter(DATA(node), rbt->deleter_arg);

View file

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: mem.h,v 1.54.12.3 2004/03/08 09:04:52 marka Exp $ */
/* $Id: mem.h,v 1.54.12.4 2004/10/11 05:55:51 marka Exp $ */
#ifndef ISC_MEM_H
#define ISC_MEM_H 1
@ -58,7 +58,7 @@ typedef void (*isc_memfree_t)(void *, void *);
* the requested space. This will increase the size of each allocation.
*/
#ifndef ISC_MEM_CHECKOVERRUN
#define ISC_MEM_CHECKOVERRUN 0
#define ISC_MEM_CHECKOVERRUN 1
#endif
/*