summaryrefslogtreecommitdiff
path: root/mysys_ssl/my_crypt.cc
diff options
context:
space:
mode:
Diffstat (limited to 'mysys_ssl/my_crypt.cc')
-rw-r--r--mysys_ssl/my_crypt.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/mysys_ssl/my_crypt.cc b/mysys_ssl/my_crypt.cc
index b95879a3012..7ca65b253e6 100644
--- a/mysys_ssl/my_crypt.cc
+++ b/mysys_ssl/my_crypt.cc
@@ -34,6 +34,7 @@ typedef TaoCrypt::byte KeyByte;
#else
#include <openssl/evp.h>
#include <openssl/aes.h>
+#include <openssl/err.h>
typedef int Dir;
static const Dir CRYPT_ENCRYPT = 1;
@@ -59,7 +60,7 @@ typedef uchar KeyByte;
struct MyCTX : EVP_CIPHER_CTX {
MyCTX() { EVP_CIPHER_CTX_init(this); }
- ~MyCTX() { EVP_CIPHER_CTX_cleanup(this); }
+ ~MyCTX() { EVP_CIPHER_CTX_cleanup(this); ERR_remove_state(0); }
};
#endif