summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-12-07 14:08:07 -0500
committerNick Mathewson <nickm@torproject.org>2012-12-07 14:08:07 -0500
commitcd4f56a37c3513cdca3463c3638067380af29219 (patch)
treed1ab0f528a29ee59e3160a66461935458ace67cb
parent504d4aa8c61c172f2b73bcee00cb3cfb0e6fff07 (diff)
downloadtor-cd4f56a37c3513cdca3463c3638067380af29219.tar.gz
tor-cd4f56a37c3513cdca3463c3638067380af29219.zip
Fix infinite loop in circuit_expire_bulding
Fixes bug 7663; bug introduced in 42e3c04a7a5fb47a9. Not in any released version of Tor.
-rw-r--r--src/or/circuituse.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index a329afb6fa..e14f9d03ca 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -382,8 +382,10 @@ circuit_expire_building(void)
* See bug #3443. */
while (next_circ) {
if (!CIRCUIT_IS_ORIGIN(next_circ) || /* didn't originate here */
- next_circ->marked_for_close) /* don't mess with marked circs */
+ next_circ->marked_for_close) { /* don't mess with marked circs */
+ next_circ = next_circ->next;
continue;
+ }
if (TO_ORIGIN_CIRCUIT(next_circ)->has_opened &&
next_circ->state == CIRCUIT_STATE_OPEN &&