summaryrefslogtreecommitdiff
path: root/src/or/circuitlist.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-12-14 00:52:15 +0000
committerRoger Dingledine <arma@torproject.org>2005-12-14 00:52:15 +0000
commitc9f6e6b0a09bcfca155c5d0c797a7bab17174c4d (patch)
treee8d74d08c8a5578208950e15ba080a0b66bf64e4 /src/or/circuitlist.c
parentd853c9a009d47b11e1c35e6bd81fc09ffdcb280e (diff)
downloadtor-c9f6e6b0a09bcfca155c5d0c797a7bab17174c4d.tar.gz
tor-c9f6e6b0a09bcfca155c5d0c797a7bab17174c4d.zip
sometimes, when we just started tor, we haven't created that
smartlist yet. so don't free it. svn:r5577
Diffstat (limited to 'src/or/circuitlist.c')
-rw-r--r--src/or/circuitlist.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c
index 17fdd47da9..6fc97f1e14 100644
--- a/src/or/circuitlist.c
+++ b/src/or/circuitlist.c
@@ -326,8 +326,10 @@ circuit_free_all(void)
circuit_free(global_circuitlist);
global_circuitlist = next;
}
- smartlist_free(circuits_pending_or_conns);
- circuits_pending_or_conns = NULL;
+ if (circuits_pending_or_conns) {
+ smartlist_free(circuits_pending_or_conns);
+ circuits_pending_or_conns = NULL;
+ }
HT_CLEAR(orconn_circid_map, &orconn_circid_circuit_map);
}