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().
This commit is contained in:
Nick Mathewson
2015-02-16 15:40:15 -05:00
parent 7117959199
commit 5d2a23397a
4 changed files with 3 additions and 61 deletions
+1 -2
View File
@@ -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;
}