diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-04-09 18:24:48 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-04-09 18:24:48 +0000 |
commit | ae0d14d346dd69666f48d2c01a63504fceebe7fc (patch) | |
tree | 1b15ba30ef98e89d5f0d755c8a336c70f8e98996 | |
parent | 73842d80451df69ee9c1b5d1fa005f00ddd1d3a7 (diff) | |
download | tor-ae0d14d346dd69666f48d2c01a63504fceebe7fc.tar.gz tor-ae0d14d346dd69666f48d2c01a63504fceebe7fc.zip |
r19267@catbus: nickm | 2008-04-09 14:19:17 -0400
Backport 14204: start policy reference counts at 1, not 2.
svn:r14331
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | doc/TODO.020 | 2 | ||||
-rw-r--r-- | src/or/policies.c | 2 |
3 files changed, 4 insertions, 2 deletions
@@ -9,6 +9,8 @@ Changes in version 0.2.0.24-rc - 2008-04-0? using the .exit notation, rather than just launching an infinite pile of circuits. Fixes bug 641. Reported by Sebastian Hahn. - When opening a logfile fails, tell us why. + - Keep address policies from leaking: start their refcount at 1, not 2. + Bugfix on 0.2.0.16-alpha. Changes in version 0.2.0.23-rc - 2008-03-24 diff --git a/doc/TODO.020 b/doc/TODO.020 index 3a79581fd3..4e6d3b7fb1 100644 --- a/doc/TODO.020 +++ b/doc/TODO.020 @@ -3,7 +3,7 @@ description of the patch.) Backport items for 0.2.0: - - r14204: start policy refcounts at 1, not 2. + o r14204: start policy refcounts at 1, not 2. - r14205: free authority certs on exit. - r14212: free static hashtables and log mutex on exit. - r14214: don't read torrc when all we diff --git a/src/or/policies.c b/src/or/policies.c index eea7dd9b3d..b7bddc6fd8 100644 --- a/src/or/policies.c +++ b/src/or/policies.c @@ -495,7 +495,7 @@ addr_policy_get_canonical_entry(addr_policy_t *e) found = tor_malloc_zero(sizeof(policy_map_ent_t)); found->policy = tor_memdup(e, sizeof(addr_policy_t)); found->policy->is_canonical = 1; - found->policy->refcnt = 1; + found->policy->refcnt = 0; HT_INSERT(policy_map, &policy_root, found); } |