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/main.c | |
parent | 60f234f42b63ed6a5208c70bbc4c32e532cc903d (diff) | |
download | tor-f672577bc6d32ecfe96582b463a83cac8eaac66f.tar.gz tor-f672577bc6d32ecfe96582b463a83cac8eaac66f.zip |
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/main.c')
-rw-r--r-- | src/or/main.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/or/main.c b/src/or/main.c index 4035dc6d2e..ef1e7bf12f 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -1314,13 +1314,14 @@ void tor_free_all(void) dirserv_free_all(); rend_service_free_all(); rep_hist_free_all(); - /* cache in dns.c */ - /* onion queue in onion.c */ - /* the circuits. */ - /* the connections. */ - /* the config */ - /* My routerinfo_t */ - /* all keys. */ + dns_free_all(); + clear_pending_onions(); + circuit_free_all(); + connection_free_all(); + config_free_all(); + router_free_all_keys(); + /* stuff in main.c */ + smartlist_free(closeable_connection_lst); } /** Do whatever cleanup is necessary before shutting Tor down. */ @@ -1333,8 +1334,8 @@ void tor_cleanup(void) { crypto_global_cleanup(); if (accounting_is_enabled(options)) accounting_record_bandwidth_usage(time(NULL)); + tor_free_all(); /* move tor_free_all back into the ifdef below later. XXX*/ #ifdef USE_DMALLOC - tor_free_all(); dmalloc_log_unfreed(); dmalloc_shutdown(); #endif |