diff options
Diffstat (limited to 'src/or/circuitlist.c')
-rw-r--r-- | src/or/circuitlist.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c index 02bf925ba5..e0cb644864 100644 --- a/src/or/circuitlist.c +++ b/src/or/circuitlist.c @@ -442,7 +442,9 @@ circuit_free(circuit_t *circ) { void *mem; size_t memlen; - tor_assert(circ); + if (!circ) + return; + if (CIRCUIT_IS_ORIGIN(circ)) { origin_circuit_t *ocirc = TO_ORIGIN_CIRCUIT(circ); mem = ocirc; @@ -558,6 +560,9 @@ circuit_free_all(void) static void circuit_free_cpath_node(crypt_path_t *victim) { + if (!victim) + return; + if (victim->f_crypto) crypto_free_cipher_env(victim->f_crypto); if (victim->b_crypto) |