From fd04db90b5e22bd5908fc2eb5866b81165c6b0ad Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 3 Oct 2005 20:53:27 +0000 Subject: [PATCH] Stop leaking storage for EVP keys. (This would be a critical bug if it had ever appeared in a released version.) svn:r5179 --- src/common/aes.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common/aes.c b/src/common/aes.c index 71250cd0c5..6179b16744 100644 --- a/src/common/aes.c +++ b/src/common/aes.c @@ -156,6 +156,9 @@ void aes_free_cipher(aes_cnt_cipher_t *cipher) { assert(cipher); +#ifdef USE_OPENSSL_EVP + EVP_CIPHER_CTX_cleanup(&cipher->key); +#endif memset(cipher, 0, sizeof(cipher)); tor_free(cipher); }