aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-10-14 23:06:43 -0400
committerNick Mathewson <nickm@torproject.org>2012-10-14 23:06:43 -0400
commit0d946e1773da2a7cf5fa22ff9c62700985b26f7f (patch)
tree04a57a5f470fa47badadeda8c8e3353db64e90d6
parent38b79473864fb662215761f650e8e03b7c518cd7 (diff)
parent3d31771da9fcd0be5db21ac19a34d978bfe6d78d (diff)
downloadtor-0d946e1773da2a7cf5fa22ff9c62700985b26f7f.tar
tor-0d946e1773da2a7cf5fa22ff9c62700985b26f7f.tar.gz
Merge remote-tracking branch 'arma/bug7029'
-rw-r--r--changes/bug70293
-rw-r--r--src/or/circuitbuild.c1
-rw-r--r--src/or/config.c3
-rw-r--r--src/or/connection.c3
-rw-r--r--src/or/main.c4
-rw-r--r--src/or/rephist.c2
6 files changed, 16 insertions, 0 deletions
diff --git a/changes/bug7029 b/changes/bug7029
new file mode 100644
index 000000000..a115b42f8
--- /dev/null
+++ b/changes/bug7029
@@ -0,0 +1,3 @@
+ o Minor bugfixes (code cleanliness):
+ - Free some more still-in-use memory at exit, to make hunting for
+ memory leaks easier. Resolves bug 7029.
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 3e20797a6..adf3c41fe 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -5897,5 +5897,6 @@ entry_guards_free_all(void)
clear_bridge_list();
smartlist_free(bridge_list);
bridge_list = NULL;
+ circuit_build_times_free_timeouts(&circ_times);
}
diff --git a/src/or/config.c b/src/or/config.c
index 8f76c3db9..cfb76dcda 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -676,6 +676,9 @@ config_free_all(void)
tor_free(torrc_defaults_fname);
tor_free(the_tor_version);
tor_free(global_dirfrontpagecontents);
+
+ tor_free(the_short_tor_version);
+ tor_free(the_tor_version);
}
/** Make <b>address</b> -- a piece of information related to our operation as
diff --git a/src/or/connection.c b/src/or/connection.c
index 538dddb1c..fb6c77d7f 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -4327,6 +4327,9 @@ connection_free_all(void)
outgoing_addrs = NULL;
}
+ tor_free(last_interface_ipv4);
+ tor_free(last_interface_ipv6);
+
#ifdef USE_BUFFEREVENTS
if (global_rate_limit)
bufferevent_rate_limit_group_free(global_rate_limit);
diff --git a/src/or/main.c b/src/or/main.c
index e0c89a919..79fe06eea 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -2503,6 +2503,10 @@ tor_free_all(int postfork)
smartlist_free(closeable_connection_lst);
smartlist_free(active_linked_connection_lst);
periodic_timer_free(second_timer);
+#ifndef USE_BUFFEREVENTS
+ periodic_timer_free(refill_timer);
+#endif
+
if (!postfork) {
release_lockfile();
}
diff --git a/src/or/rephist.c b/src/or/rephist.c
index f9c0b5beb..b9e7be1fc 100644
--- a/src/or/rephist.c
+++ b/src/or/rephist.c
@@ -3003,6 +3003,8 @@ rep_hist_free_all(void)
digestmap_free(history_map, free_or_history);
tor_free(read_array);
tor_free(write_array);
+ tor_free(dir_read_array);
+ tor_free(dir_write_array);
tor_free(last_stability_doc);
tor_free(exit_bytes_read);
tor_free(exit_bytes_written);