[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r14331: Backport 14204: start policy reference counts at 1, not 2. (in tor/branches/tor-0_2_0-patches: . doc src/or)



Author: nickm
Date: 2008-04-09 14:24:48 -0400 (Wed, 09 Apr 2008)
New Revision: 14331

Modified:
   tor/branches/tor-0_2_0-patches/
   tor/branches/tor-0_2_0-patches/ChangeLog
   tor/branches/tor-0_2_0-patches/doc/TODO.020
   tor/branches/tor-0_2_0-patches/src/or/policies.c
Log:
 r19267@catbus:  nickm | 2008-04-09 14:19:17 -0400
 Backport 14204: start policy reference counts at 1, not 2.



Property changes on: tor/branches/tor-0_2_0-patches
___________________________________________________________________
 svk:merge ticket from /tor/020 [r19267] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/branches/tor-0_2_0-patches/ChangeLog
===================================================================
--- tor/branches/tor-0_2_0-patches/ChangeLog	2008-04-09 18:13:59 UTC (rev 14330)
+++ tor/branches/tor-0_2_0-patches/ChangeLog	2008-04-09 18:24:48 UTC (rev 14331)
@@ -9,6 +9,8 @@
       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

Modified: tor/branches/tor-0_2_0-patches/doc/TODO.020
===================================================================
--- tor/branches/tor-0_2_0-patches/doc/TODO.020	2008-04-09 18:13:59 UTC (rev 14330)
+++ tor/branches/tor-0_2_0-patches/doc/TODO.020	2008-04-09 18:24:48 UTC (rev 14331)
@@ -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

Modified: tor/branches/tor-0_2_0-patches/src/or/policies.c
===================================================================
--- tor/branches/tor-0_2_0-patches/src/or/policies.c	2008-04-09 18:13:59 UTC (rev 14330)
+++ tor/branches/tor-0_2_0-patches/src/or/policies.c	2008-04-09 18:24:48 UTC (rev 14331)
@@ -495,7 +495,7 @@
     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);
   }