[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] [tor/master] Fix double-mark bug when failing to init transparent connection
commit 85da676108f0de765301f961bc58aebd139a5564
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Tue Jan 25 19:07:03 2011 -0500
Fix double-mark bug when failing to init transparent connection
Fixes part of bug 2279. Bugfix on 0.1.2.1-alpha.
---
changes/bug2279 | 5 +++++
src/or/connection.c | 3 ++-
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/changes/bug2279 b/changes/bug2279
new file mode 100644
index 0000000..b796cda
--- /dev/null
+++ b/changes/bug2279
@@ -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.
+
diff --git a/src/or/connection.c b/src/or/connection.c
index 8a21d81..55a9557 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -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;