aboutsummaryrefslogtreecommitdiff
path: root/src/or/cpuworker.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-02-16 15:40:15 -0500
committerNick Mathewson <nickm@torproject.org>2015-02-16 15:40:15 -0500
commit5d2a23397a3775eecb35bea23edffbef40b6cd94 (patch)
tree6680efe61ba7e04c346bf7f0c9238d82d17331a7 /src/or/cpuworker.c
parent7117959199a230cc7f1684794b8b13235b5f2715 (diff)
downloadtor-5d2a23397a3775eecb35bea23edffbef40b6cd94.tar.gz
tor-5d2a23397a3775eecb35bea23edffbef40b6cd94.zip
Fix a few coverity "Use after NULL check" warnings
Also remove the unit test mocks that allowed get_options() to be NULL; that's an invariant violation for get_options().
Diffstat (limited to 'src/or/cpuworker.c')
-rw-r--r--src/or/cpuworker.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c
index 5787c75530..09ffdb81d1 100644
--- a/src/or/cpuworker.c
+++ b/src/or/cpuworker.c
@@ -359,8 +359,7 @@ cpuworker_onion_handshake_replyfn(void *work_)
log_debug(LD_OR,
"decoding onionskin failed. "
"(Old key or bad software.) Closing.");
- if (circ)
- circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_TORPROTOCOL);
+ circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_TORPROTOCOL);
goto done_processing;
}