]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a memleak when fetching descriptors for bridges in ExcludeNodes.
authorGeorge Kadianakis <desnacked@gmail.com>
Thu, 3 Nov 2011 16:16:31 +0000 (17:16 +0100)
committerNick Mathewson <nickm@torproject.org>
Thu, 3 Nov 2011 17:23:50 +0000 (13:23 -0400)
changes/bug4383 [new file with mode: 0644]
src/or/circuitbuild.c

diff --git a/changes/bug4383 b/changes/bug4383
new file mode 100644 (file)
index 0000000..e618b8c
--- /dev/null
@@ -0,0 +1,5 @@
+  o Minor bugfixes:
+    - Fix a memleak in launch_direct_bridge_descriptor_fetch() that
+      occured when a client tried to fetch a descriptor for a bridge
+      in ExcludeNodes. Fixes #4383; bugfix on 0.2.2.25-alpha.
+
index c864fd2497980ff8308485481cf73f1d27e9393f..72ec9e4880a9c9e16cc7e5c27d86e82114a94f9a 100644 (file)
@@ -4670,7 +4670,6 @@ launch_direct_bridge_descriptor_fetch(bridge_info_t *bridge)
       DIR_PURPOSE_FETCH_SERVERDESC))
     return; /* it's already on the way */
 
-  address = tor_dup_addr(&bridge->addr);
   if (routerset_contains_bridge(options->ExcludeNodes, bridge)) {
     download_status_mark_impossible(&bridge->fetch_status);
     log_warn(LD_APP, "Not using bridge at %s: it is in ExcludeNodes.",
@@ -4678,6 +4677,8 @@ launch_direct_bridge_descriptor_fetch(bridge_info_t *bridge)
     return;
   }
 
+  address = tor_dup_addr(&bridge->addr);
+
   directory_initiate_command(address, &bridge->addr,
                              bridge->port, 0,
                              0, /* does not matter */