summaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-01-31 00:33:32 +0000
committerRoger Dingledine <arma@torproject.org>2005-01-31 00:33:32 +0000
commitd6489d8e4160772cbcc90042d2e2892f6c77cef7 (patch)
treedc965bb6fa4543869440a918d172af78adab2bd5 /src/or/connection.c
parent75b45bcd4d314fed0a4e047e146671bd33e20c85 (diff)
downloadtor-d6489d8e4160772cbcc90042d2e2892f6c77cef7.tar.gz
tor-d6489d8e4160772cbcc90042d2e2892f6c77cef7.zip
lay a trap for situations where we connection_free something
that's still on one of the lists. in particular, this will detect situations where we mark-for-close and then free it ourselves. svn:r3475
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 7aa6fc5d9c..59da957ccb 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -143,6 +143,8 @@ connection_t *connection_new(int type) {
void connection_free(connection_t *conn) {
tor_assert(conn);
tor_assert(conn->magic == CONNECTION_MAGIC);
+ tor_assert(!connection_in_array(conn));
+ tor_assert(!connection_is_on_closeable_list(conn));
if (!connection_is_listener(conn)) {
buf_free(conn->inbuf);