diff options
author | Peter Palfrader <peter@palfrader.org> | 2005-02-03 07:25:10 +0000 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2005-02-03 07:25:10 +0000 |
commit | ddd724ef94cbd77564ecba6662147eff99dd7dc1 (patch) | |
tree | 340fa84af0ef540fcd6fe5c9e56db1fa20dbf249 /src/or/main.c | |
parent | dfa3a0220f5c4fd03c9f26b6303bf10ee578404f (diff) | |
download | tor-ddd724ef94cbd77564ecba6662147eff99dd7dc1.tar.gz tor-ddd724ef94cbd77564ecba6662147eff99dd7dc1.zip |
Add --with-dmalloc configure option
svn:r3508
Diffstat (limited to 'src/or/main.c')
-rw-r--r-- | src/or/main.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c index 08a84096ed..386df827dc 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -11,6 +11,10 @@ const char main_c_id[] = "$Id$"; **/ #include "or.h" +#include "orconfig.h" +#ifdef USE_DMALLOC +#include <dmalloc.h> +#endif /* These signals are defined to help control_signal_act work. */ #ifndef SIGHUP @@ -1314,7 +1318,11 @@ void tor_cleanup(void) { crypto_global_cleanup(); if (accounting_is_enabled(options)) accounting_record_bandwidth_usage(time(NULL)); +#ifdef USE_DMALLOC tor_free_all(); + dmalloc_log_unfreed(); + dmalloc_shutdown(); +#endif } /** Read/create keys as needed, and echo our fingerprint to stdout. */ |