Commit 896f8836 authored by Mark Andrews's avatar Mark Andrews

2442. [bug] A lock could be destroyed twice. [RT# 18626]

parent 6011ef0f
2442. [bug] A lock could be destroyed twice. [RT# 18626]
2441. [bug] isc_radix_insert() could copy radix tree nodes
incompletely. [RT #18573]
......
......@@ -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;
}
......
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