Przeglądaj źródła

Stop leaking storage for EVP keys. (This would be a critical bug if it had ever appeared in a released version.)

svn:r5179
Nick Mathewson 20 lat temu
rodzic
commit
fd04db90b5
1 zmienionych plików z 3 dodań i 0 usunięć
  1. 3 0
      src/common/aes.c

+ 3 - 0
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);
 }