From 934252d6ca2b8d03d7ff7005443a416abae57b25 Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Thu, 14 Apr 2011 13:08:11 +0200 Subject: [PATCH] Fixed missing CRYPTO_cleanup_all_ex_data() in ssh_finalize --- src/init.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; }