2442. [bug] A lock could be destroyed twice. [RT# 18626]
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
2442. [bug] A lock could be destroyed twice. [RT# 18626]
|
||||
|
||||
2441. [bug] isc_radix_insert() could copy radix tree nodes
|
||||
incompletely. [RT #18573]
|
||||
|
||||
|
||||
+6
-4
@@ -14,7 +14,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: radix.c,v 1.17 2008/09/12 23:47:25 tbox Exp $ */
|
||||
/* $Id: radix.c,v 1.18 2008/09/14 04:54:49 marka Exp $ */
|
||||
|
||||
/*
|
||||
* This source was adapted from MRT's RCS Ids:
|
||||
@@ -98,13 +98,15 @@ _ref_prefix(isc_mem_t *mctx, isc_prefix_t **target, isc_prefix_t *prefix) {
|
||||
(prefix->family == AF_INET6 && prefix->bitlen <= 128));
|
||||
REQUIRE(target != NULL);
|
||||
|
||||
/* If this prefix is a static allocation, copy it into new memory */
|
||||
/*
|
||||
* If this prefix is a static allocation, copy it into new memory.
|
||||
* (Note, the refcount still has to be destroyed by the calling
|
||||
* routine.)
|
||||
*/
|
||||
if (isc_refcount_current(&prefix->refcount) == 0) {
|
||||
isc_result_t ret;
|
||||
ret = _new_prefix(mctx, target, prefix->family,
|
||||
&prefix->add, prefix->bitlen);
|
||||
if (ret == ISC_R_SUCCESS)
|
||||
isc_refcount_destroy(&prefix->refcount);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user