diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-02-11 01:26:47 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-02-11 01:26:47 +0000 |
commit | f672577bc6d32ecfe96582b463a83cac8eaac66f (patch) | |
tree | 03999d6f3338a1383cea660189cad8f6fcdf08b2 /src/or/onion.c | |
parent | 60f234f42b63ed6a5208c70bbc4c32e532cc903d (diff) | |
download | tor-f672577bc6d32ecfe96582b463a83cac8eaac66f.tar tor-f672577bc6d32ecfe96582b463a83cac8eaac66f.tar.gz |
Free even more things on shutdown. Temporarily move tor_free_all out from #ifdef so it gets tested more.
svn:r3614
Diffstat (limited to 'src/or/onion.c')
-rw-r--r-- | src/or/onion.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/or/onion.c b/src/or/onion.c index d8fa3005f..3a685b372 100644 --- a/src/or/onion.c +++ b/src/or/onion.c @@ -316,3 +316,15 @@ onion_skin_client_handshake(crypto_dh_env_t *handshake_state, return 0; } +/** Remove all circuits from the pending list. Called from tor_free_all. */ +void +clear_pending_onions(void) +{ + while (ol_list) { + struct onion_queue_t *victim = ol_list; + ol_list = victim->next; + tor_free(victim); + } + ol_list = ol_tail = NULL; + ol_length = 0; +} |