test: Handle NULL circuit pointer in new_fake_orcirc

Coverity CID: 1455207

Closes #32376

Signed-off-by: David Goulet <dgoulet@torproject.org>
This commit is contained in:
David Goulet 2019-11-05 08:05:19 -05:00
parent 60d5ff303d
commit cd7812b470

View File

@ -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);