瀏覽代碼

Free circuits_for_buffer_stats on shutdown

Nick Mathewson 14 年之前
父節點
當前提交
403b6cfded
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      src/or/rephist.c

+ 6 - 0
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;
+  }
 }