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

[or-cvs] r10014: backport r9918: - Fix a memory leak when we ask for "all" ne (in tor/branches/tor-0_1_2-patches: . src/or)



Author: arma
Date: 2007-04-24 01:04:21 -0400 (Tue, 24 Apr 2007)
New Revision: 10014

Modified:
   tor/branches/tor-0_1_2-patches/ChangeLog
   tor/branches/tor-0_1_2-patches/src/or/routerlist.c
Log:
backport r9918:
- Fix a memory leak when we ask for "all" networkstatuses and we
  get one we don't recognize.


Modified: tor/branches/tor-0_1_2-patches/ChangeLog
===================================================================
--- tor/branches/tor-0_1_2-patches/ChangeLog	2007-04-24 01:26:13 UTC (rev 10013)
+++ tor/branches/tor-0_1_2-patches/ChangeLog	2007-04-24 05:04:21 UTC (rev 10014)
@@ -1,3 +1,11 @@
+Changes in version 0.1.2.13 - 2007-04-24
+  o Minor fixes:
+    - Fix a memory leak when we ask for "all" networkstatuses and we
+      get one we don't recognize.
+    - Add more asserts to hunt down bug 417.
+    - Disable kqueue on OS X 10.3 and earlier, to fix bug 371.
+
+
 Changes in version 0.1.2.12-rc - 2007-03-16
   o Major bugfixes:
     - Fix an infinite loop introduced in 0.1.2.7-alpha when we serve
@@ -410,7 +418,7 @@
 
   o Minor features (directory):
     - Authorities now specify server versions in networkstatus. This adds
-      about 2% to the side of compressed networkstatus docs, and allows
+      about 2% to the size of compressed networkstatus docs, and allows
       clients to tell which servers support BEGIN_DIR and which don't.
       The implementation is forward-compatible with a proposed future
       protocol version scheme not tied to Tor versions.

Modified: tor/branches/tor-0_1_2-patches/src/or/routerlist.c
===================================================================
--- tor/branches/tor-0_1_2-patches/src/or/routerlist.c	2007-04-24 01:26:13 UTC (rev 10013)
+++ tor/branches/tor-0_1_2-patches/src/or/routerlist.c	2007-04-24 05:04:21 UTC (rev 10014)
@@ -2490,9 +2490,9 @@
     if (smartlist_string_isin(requested_fingerprints, fp)) {
       smartlist_string_remove(requested_fingerprints, fp);
     } else {
-      char *requested =
-        smartlist_join_strings(requested_fingerprints," ",0,NULL);
       if (source != NS_FROM_DIR_ALL) {
+        char *requested =
+          smartlist_join_strings(requested_fingerprints," ",0,NULL);
         log_warn(LD_DIR,
                "We received a network status with a fingerprint (%s) that we "
                "never requested. (We asked for: %s.) Dropping.",