[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] Write a function header for Roger so he can fill it with life



Update of /home/or/cvsroot/tor/src/or
In directory moria.mit.edu:/tmp/cvs-serv32324/src/or

Modified Files:
	main.c 
Log Message:
Write a function header for Roger so he can fill it with life

Index: main.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/main.c,v
retrieving revision 1.437
retrieving revision 1.438
diff -u -d -r1.437 -r1.438
--- main.c	2 Feb 2005 00:19:09 -0000	1.437
+++ main.c	3 Feb 2005 07:23:48 -0000	1.438
@@ -1295,6 +1295,15 @@
   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 @@
   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. */