[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] Stop leaking storage for EVP keys. (This would be a critica...



Update of /home/or/cvsroot/tor/src/common
In directory moria:/tmp/cvs-serv28752/src/common

Modified Files:
	aes.c 
Log Message:
Stop leaking storage for EVP keys. (This would be a critical bug if it had ever appeared in a released version.)

Index: aes.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/common/aes.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- aes.c	30 Sep 2005 20:47:58 -0000	1.28
+++ aes.c	3 Oct 2005 20:53:27 -0000	1.29
@@ -156,6 +156,9 @@
 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);
 }