aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2011-04-14 13:08:11 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2011-04-14 13:09:09 +0200
commit934252d6ca2b8d03d7ff7005443a416abae57b25 (patch)
tree304e90c4d7e43ef620d4851e719af7d5306cb55f /src
parent94e7d345a7561a3ee5923808c2ee65244e2f5184 (diff)
downloadlibssh-934252d6ca2b8d03d7ff7005443a416abae57b25.tar.gz
libssh-934252d6ca2b8d03d7ff7005443a416abae57b25.tar.xz
libssh-934252d6ca2b8d03d7ff7005443a416abae57b25.zip
Fixed missing CRYPTO_cleanup_all_ex_data() in ssh_finalize
Diffstat (limited to 'src')
-rw-r--r--src/init.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/init.c b/src/init.c
index 7b29d2b6..21505db1 100644
--- a/src/init.c
+++ b/src/init.c
@@ -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;
}