aboutsummaryrefslogtreecommitdiff
path: root/src/common/aes.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/aes.c')
-rw-r--r--src/common/aes.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/aes.c b/src/common/aes.c
index e07665635..451c31f02 100644
--- a/src/common/aes.c
+++ b/src/common/aes.c
@@ -263,7 +263,8 @@ aes_set_key(aes_cnt_cipher_t *cipher, const char *key, int key_bits)
void
aes_free_cipher(aes_cnt_cipher_t *cipher)
{
- tor_assert(cipher);
+ if (!cipher)
+ return;
#ifdef USE_OPENSSL_EVP
EVP_CIPHER_CTX_cleanup(&cipher->key);
#endif