summaryrefslogtreecommitdiff
path: root/src/or/circuitlist.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2014-02-25 15:05:06 -0500
committerRoger Dingledine <arma@torproject.org>2014-02-25 15:05:06 -0500
commit4ef52cc16759eb75523b9694d75d051c01ba994c (patch)
tree62edc6c3274f0e2a14f278cdeb8f7252eb246f03 /src/or/circuitlist.c
parent4428a14616c1a97430f9dab5419f2426f97c8883 (diff)
parentd7950eda2bfd927a18df4a2620952d10dda1705c (diff)
downloadtor-4ef52cc16759eb75523b9694d75d051c01ba994c.tar.gz
tor-4ef52cc16759eb75523b9694d75d051c01ba994c.zip
Merge branch 'maint-0.2.4' into release-0.2.4
Diffstat (limited to 'src/or/circuitlist.c')
-rw-r--r--src/or/circuitlist.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c
index b0e24a5fee..c7b15e40ba 100644
--- a/src/or/circuitlist.c
+++ b/src/or/circuitlist.c
@@ -709,7 +709,7 @@ circuit_free_cpath(crypt_path_t *cpath)
if (!cpath)
return;
- /* it's a doubly linked list, so we have to notice when we've
+ /* it's a circular list, so we have to notice when we've
* gone through it once. */
while (cpath->next && cpath->next != head) {
victim = cpath;
@@ -720,6 +720,14 @@ circuit_free_cpath(crypt_path_t *cpath)
circuit_free_cpath_node(cpath);
}
+/** Remove all the items in the cpath on <b>circ</b>.*/
+void
+circuit_clear_cpath(origin_circuit_t *circ)
+{
+ circuit_free_cpath(circ->cpath);
+ circ->cpath = NULL;
+}
+
/** Release all storage held by circuits. */
void
circuit_free_all(void)