]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Free circuits_for_buffer_stats on shutdown
authorNick Mathewson <nickm@torproject.org>
Thu, 7 Apr 2011 18:59:28 +0000 (14:59 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 7 Apr 2011 18:59:28 +0000 (14:59 -0400)
src/or/rephist.c

index 74e156f33d1568ce33172c2a616fc2834af4595a..9b7eefecf248b91651816e5a9062906111521101 100644 (file)
@@ -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;
+  }
 }