aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2005-02-03 07:23:48 +0000
committerPeter Palfrader <peter@palfrader.org>2005-02-03 07:23:48 +0000
commitdfa3a0220f5c4fd03c9f26b6303bf10ee578404f (patch)
treed99886517403d8580e701d0060990fddd34966c3 /src
parentf3b74a2adb886d459536a51b4bc8360c22649289 (diff)
downloadtor-dfa3a0220f5c4fd03c9f26b6303bf10ee578404f.tar.gz
tor-dfa3a0220f5c4fd03c9f26b6303bf10ee578404f.zip
Write a function header for Roger so he can fill it with life
svn:r3507
Diffstat (limited to 'src')
-rw-r--r--src/or/main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 31e3d2bd37..08a84096ed 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -1295,6 +1295,15 @@ static int tor_init(int argc, char *argv[]) {
return 0;
}
+/** Free all memory that we might have allocated somewhere.
+ * Helps us find the real leaks with dmalloc and the like.
+ *
+ * Also valgrind should then report 0 reachable in its
+ * leak report */
+void tor_free_all(void) {
+
+}
+
/** Do whatever cleanup is necessary before shutting Tor down. */
void tor_cleanup(void) {
or_options_t *options = get_options();
@@ -1305,6 +1314,7 @@ void tor_cleanup(void) {
crypto_global_cleanup();
if (accounting_is_enabled(options))
accounting_record_bandwidth_usage(time(NULL));
+ tor_free_all();
}
/** Read/create keys as needed, and echo our fingerprint to stdout. */