projects
/
paraslash.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
openssl: Fix (harmless) memory leaks at exit.
[paraslash.git]
/
openssl.c
diff --git
a/openssl.c
b/openssl.c
index 5f04c845c6ec1e8b5d837f827233df425033fad4..0ad9d7db4e7f035dce140365b2b38abc144b6923 100644
(file)
--- a/
openssl.c
+++ b/
openssl.c
@@
-60,6
+60,12
@@
void crypt_shutdown(void)
#ifdef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA
CRYPTO_cleanup_all_ex_data();
#endif
+#ifdef HAVE_OPENSSL_THREAD_STOP /* openssl-1.1 or later */
+ OPENSSL_thread_stop();
+#else /* openssl-1.0 */
+ ERR_remove_thread_state(NULL);
+#endif
+ EVP_cleanup();
}
/*