Skip to content
Snippets Groups Projects
Commit 4f6cf727 authored by Roger Dingledine's avatar Roger Dingledine
Browse files

fix a pair of lurking segfaults

svn:r1198
parent 6f3c6d12
Branches
Tags
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment