diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-11-17 09:06:47 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-11-17 09:06:47 -0500 |
commit | 58edf92678019c0e69c043976b2af06551d83ed3 (patch) | |
tree | 906791966a00ee5857f965b3e5a4cd75492cecfc /src/or/connection_edge.c | |
parent | 84b3350c83a995a7668c16cb06ae069664dc0633 (diff) | |
download | tor-58edf92678019c0e69c043976b2af06551d83ed3.tar.gz tor-58edf92678019c0e69c043976b2af06551d83ed3.zip |
Free pending_entry_connections on shutdown.
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r-- | src/or/connection_edge.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 20a27dc90c..67e594a6a9 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -509,7 +509,6 @@ connection_edge_finished_connecting(edge_connection_t *edge_conn) * (Right now, we check in several places to make sure that this list is * correct. When it's incorrect, we'll fix it, and log a BUG message.) */ -/* XXXXX Free this list on exit. */ static smartlist_t *pending_entry_connections = NULL; static int untried_pending_connections = 0; @@ -3591,3 +3590,11 @@ circuit_clear_isolation(origin_circuit_t *circ) circ->socks_username_len = circ->socks_password_len = 0; } +/** Free all storage held in module-scoped variables for connection_edge.c */ +void +connection_edge_free_all(void) +{ + untried_pending_connections = 0; + smartlist_free(pending_entry_connections); + pending_entry_connections = NULL; +} |