diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-01-31 14:44:14 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-01-31 14:44:14 -0500 |
commit | 35d827094237e92436ff28fffeb282ac83220839 (patch) | |
tree | ef80312e1a3d9aac123bc5aa720886aedd2b96ed /src/or/entrynodes.c | |
parent | 09a00a2f826233b417066d90dcf5ba9be48b4e13 (diff) | |
download | tor-35d827094237e92436ff28fffeb282ac83220839.tar.gz tor-35d827094237e92436ff28fffeb282ac83220839.zip |
When marking guard state instances on a channel, don't mark NULL
It's okay for guard_state to be null: we might have a fallback
circuit, or we might not be using guards.
Fixes bug 211228; bugfix on 0.3.0.1-alpha
Diffstat (limited to 'src/or/entrynodes.c')
-rw-r--r-- | src/or/entrynodes.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c index c5fb92e35a..f9b3b60a6f 100644 --- a/src/or/entrynodes.c +++ b/src/or/entrynodes.c @@ -2172,7 +2172,11 @@ entry_guard_chan_failed(channel_t *chan) continue; origin_circuit_t *origin_circ = TO_ORIGIN_CIRCUIT(circ); - entry_guard_failed(&origin_circ->guard_state); + if (origin_circ->guard_state) { + /* We might have no guard state if we didn't use a guard on this + * circuit (eg it's for a fallback directory). */ + entry_guard_failed(&origin_circ->guard_state); + } } SMARTLIST_FOREACH_END(circ); smartlist_free(pending); } |