]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix double-mark bug when failing to init transparent connection
authorNick Mathewson <nickm@torproject.org>
Wed, 26 Jan 2011 00:07:03 +0000 (19:07 -0500)
committerNick Mathewson <nickm@torproject.org>
Wed, 26 Jan 2011 00:07:03 +0000 (19:07 -0500)
Fixes part of bug 2279.  Bugfix on 0.1.2.1-alpha.

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

diff --git a/changes/bug2279 b/changes/bug2279
new file mode 100644 (file)
index 0000000..b796cda
--- /dev/null
@@ -0,0 +1,5 @@
+  o Minor bugfixes
+    - Avoid a double mark-for-free warning when failing to attach a
+      transparent proxy connection.  Fixes bug 2279.  Bugfix on
+      Tor 0.1.2.1 alpha.
+
index 8a21d81c58be26565e86f0c8afc585f981f46c55..55a9557ef6810f3ade959b654b6bc76ae5900fd4 100644 (file)
@@ -1178,7 +1178,8 @@ connection_handle_listener_read(connection_t *conn, int new_type)
   }
 
   if (connection_init_accepted_conn(newconn, conn->type) < 0) {
-    connection_mark_for_close(newconn);
+    if (! conn->marked_for_close)
+      connection_mark_for_close(newconn);
     return 0;
   }
   return 0;