diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2011-04-14 13:08:11 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2011-04-14 13:40:42 +0200 |
commit | a309c1b38e593dc28d09723251e9103c34157628 (patch) | |
tree | 38f6b80eac9781947fe642961675c0a1aa875642 | |
parent | e56aaf5f44c281715db77fc8fa59c967edd6d4f5 (diff) | |
download | libssh-a309c1b38e593dc28d09723251e9103c34157628.tar.gz libssh-a309c1b38e593dc28d09723251e9103c34157628.tar.xz libssh-a309c1b38e593dc28d09723251e9103c34157628.zip |
Fixed missing CRYPTO_cleanup_all_ex_data() in ssh_finalize
(cherry picked from commit 934252d6ca2b8d03d7ff7005443a416abae57b25)
-rw-r--r-- | src/init.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -71,17 +71,21 @@ int ssh_init(void) { @returns 0 otherwise */ int ssh_finalize(void) { - ssh_threads_finalize(); ssh_crypto_finalize(); ssh_socket_cleanup(); #ifdef HAVE_LIBGCRYPT gcry_control(GCRYCTL_TERM_SECMEM); #elif defined HAVE_LIBCRYPTO EVP_cleanup(); + CRYPTO_cleanup_all_ex_data(); #endif #ifdef _WIN32 WSACleanup(); #endif + /* It is important to finalize threading after CRYPTO because + * it still depends on it */ + ssh_threads_finalize(); + return 0; } |