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

[tor-commits] [tor/maint-0.2.2] Free circuits_for_buffer_stats on shutdown



commit 403b6cfdedee7ebc8fe0b5d1c187e8ae3611aec1
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Thu Apr 7 14:59:28 2011 -0400

    Free circuits_for_buffer_stats on shutdown
---
 src/or/rephist.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/or/rephist.c b/src/or/rephist.c
index 74e156f..9b7eefe 100644
--- a/src/or/rephist.c
+++ b/src/or/rephist.c
@@ -2545,5 +2545,11 @@ rep_hist_free_all(void)
   tor_free(exit_streams);
   built_last_stability_doc_at = 0;
   predicted_ports_free();
+  if (circuits_for_buffer_stats) {
+    SMARTLIST_FOREACH(circuits_for_buffer_stats, circ_buffer_stats_t *, s,
+                      tor_free(s));
+    smartlist_free(circuits_for_buffer_stats);
+    circuits_for_buffer_stats = NULL;
+  }
 }
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits