diff options
author | Roger Dingledine <arma@torproject.org> | 2004-03-02 18:08:07 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-03-02 18:08:07 +0000 |
commit | 4f6cf727b9af6070ed6db02f8be5e17057a04a60 (patch) | |
tree | 790d4f4e8803b1641eb52272028b27487ca30ca4 /src | |
parent | 6f3c6d128973253218a476cba9207c737b93d759 (diff) | |
download | tor-4f6cf727b9af6070ed6db02f8be5e17057a04a60.tar tor-4f6cf727b9af6070ed6db02f8be5e17057a04a60.tar.gz |
fix a pair of lurking segfaults
svn:r1198
Diffstat (limited to 'src')
-rw-r--r-- | src/or/circuit.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/circuit.c b/src/or/circuit.c index 925e15be9..22a79a764 100644 --- a/src/or/circuit.c +++ b/src/or/circuit.c @@ -65,8 +65,11 @@ void circuit_close_all_marked() global_circuitlist = tmp; } + if(!global_circuitlist) + return; + for (tmp = global_circuitlist; tmp->next; tmp=tmp->next) { - while (tmp->next->marked_for_close) { + while (tmp->next && tmp->next->marked_for_close) { m = tmp->next->next; circuit_free(tmp->next); tmp->next = m; |