diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-02-07 10:47:34 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-02-07 10:47:34 -0500 |
commit | babbd3ff08496bfd3d99f05257279ff6135fb027 (patch) | |
tree | 5226404947be461b8339b9052811185dde166356 /src/or/circuitlist.c | |
parent | 372adfa09a143490dfc058a6e2db78ca27ef9399 (diff) | |
parent | 1068e50aecefac8469991884afc08b6ecb24e740 (diff) | |
download | tor-babbd3ff08496bfd3d99f05257279ff6135fb027.tar.gz tor-babbd3ff08496bfd3d99f05257279ff6135fb027.zip |
Merge remote-tracking branch 'public/feature9777_024_squashed'
Conflicts:
src/or/circuitbuild.c
Diffstat (limited to 'src/or/circuitlist.c')
-rw-r--r-- | src/or/circuitlist.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c index c31bc49d08..22224db547 100644 --- a/src/or/circuitlist.c +++ b/src/or/circuitlist.c @@ -796,7 +796,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; @@ -807,6 +807,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) |