commit cd7812b4702493a95d62ad9ee413086ec7e248b9 Author: David Goulet dgoulet@torproject.org Date: Tue Nov 5 08:05:19 2019 -0500
test: Handle NULL circuit pointer in new_fake_orcirc
Coverity CID: 1455207
Closes #32376
Signed-off-by: David Goulet dgoulet@torproject.org --- src/test/fakecircs.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/src/test/fakecircs.c b/src/test/fakecircs.c index 62027e033..82a8722ba 100644 --- a/src/test/fakecircs.c +++ b/src/test/fakecircs.c @@ -71,6 +71,10 @@ new_fake_orcirc(channel_t *nchan, channel_t *pchan) void free_fake_orcirc(or_circuit_t *orcirc) { + if (!orcirc) { + return; + } + circuit_t *circ = TO_CIRCUIT(orcirc);
relay_crypto_clear(&orcirc->crypto);
tor-commits@lists.torproject.org