]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Check newconn, not conn, before marking newconn for close
authorNick Mathewson <nickm@torproject.org>
Mon, 14 Mar 2011 22:52:15 +0000 (18:52 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 14 Mar 2011 22:52:15 +0000 (18:52 -0400)
This fixes bug 2757.  It's a bugfix on 85da676108f0d.

changes/bug2757 [new file with mode: 0644]
src/or/connection.c

diff --git a/changes/bug2757 b/changes/bug2757
new file mode 100644 (file)
index 0000000..f947afa
--- /dev/null
@@ -0,0 +1,6 @@
+  - Minor bugfixes
+    o Avoid a double-mark-for-free warning when failing to attach a
+      transparent proxy connection.  (We thought we had fixed this in
+      0.2.2.23-alpha, but it turns out our fix was checking the wrong
+      connection.)  Fixes bug 2757; bugfix on 0.1.2.1-alpha (the original
+      bug) and 0.2.2.23-alpha (the incorrect fix).
index fd30ac8cb6bbc5f19fdf2ea45061d65465a9b523..1894bc71caf566410b83ae73dac311e040c5373a 100644 (file)
@@ -1178,7 +1178,7 @@ connection_handle_listener_read(connection_t *conn, int new_type)
   }
 
   if (connection_init_accepted_conn(newconn, conn->type) < 0) {
-    if (! conn->marked_for_close)
+    if (! newconn->marked_for_close)
       connection_mark_for_close(newconn);
     return 0;
   }