mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-14 07:03:44 +01:00
fix a pair of lurking segfaults
svn:r1198
This commit is contained in:
parent
6f3c6d1289
commit
4f6cf727b9
@ -65,8 +65,11 @@ void circuit_close_all_marked()
|
|||||||
global_circuitlist = tmp;
|
global_circuitlist = tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!global_circuitlist)
|
||||||
|
return;
|
||||||
|
|
||||||
for (tmp = global_circuitlist; tmp->next; tmp=tmp->next) {
|
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;
|
m = tmp->next->next;
|
||||||
circuit_free(tmp->next);
|
circuit_free(tmp->next);
|
||||||
tmp->next = m;
|
tmp->next = m;
|
||||||
|
Loading…
Reference in New Issue
Block a user