mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 15:43:32 +01:00
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:
parent
60d5ff303d
commit
cd7812b470
@ -71,6 +71,10 @@ new_fake_orcirc(channel_t *nchan, channel_t *pchan)
|
|||||||
void
|
void
|
||||||
free_fake_orcirc(or_circuit_t *orcirc)
|
free_fake_orcirc(or_circuit_t *orcirc)
|
||||||
{
|
{
|
||||||
|
if (!orcirc) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
circuit_t *circ = TO_CIRCUIT(orcirc);
|
circuit_t *circ = TO_CIRCUIT(orcirc);
|
||||||
|
|
||||||
relay_crypto_clear(&orcirc->crypto);
|
relay_crypto_clear(&orcirc->crypto);
|
||||||
|
Loading…
Reference in New Issue
Block a user