浏览代码

Merge remote-tracking branch 'sebastian/channel_free_list'

Nick Mathewson 10 年之前
父节点
当前提交
2c5fec15f7
共有 2 个文件被更改,包括 7 次插入0 次删除
  1. 6 0
      changes/bug16924
  2. 1 0
      src/or/channel.c

+ 6 - 0
changes/bug16924

@@ -0,0 +1,6 @@
+  o Minor bugfixes:
+    - When calling channel_free_list(), avoid calling smartlist_remove()
+      while inside a FOREACH loop. This partially reverts commit
+      17356fe7fd96af where the correct SMARTLIST_DEL_CURRENT was
+      removed.  Fixes bug 16929; bugfix on 0.2.4.4-alpha.
+

+ 1 - 0
src/or/channel.c

@@ -3069,6 +3069,7 @@ channel_free_list(smartlist_t *channels, int mark_for_close)
     if (curr->cmux) {
       circuitmux_detach_all_circuits(curr->cmux, NULL);
     }
+    SMARTLIST_DEL_CURRENT(channels, curr);
     channel_unregister(curr);
     if (mark_for_close) {
       if (!CHANNEL_CONDEMNED(curr)) {