mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-12-25 17:49:52 +03:00
Merge PR #884: Fix memory leak in OpenSSL deinitialization function
This commit is contained in:
commit
ba94d8a6fa
@ -18,6 +18,7 @@
|
||||
#include <stdarg.h>
|
||||
#include <time.h>
|
||||
#include <errno.h>
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/ssl.h>
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/rand.h>
|
||||
@ -3684,6 +3685,10 @@ void FreeOpenSSLThreadState()
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
CRYPTO_cleanup_all_ex_data();
|
||||
ERR_remove_thread_state(NULL);
|
||||
#else
|
||||
#ifndef LIBRESSL_VERSION_NUMBER
|
||||
OPENSSL_thread_stop();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -566,15 +566,15 @@ void FreeMayaqua()
|
||||
// Release of real-time clock
|
||||
FreeTick64();
|
||||
|
||||
// Release of crypt library
|
||||
FreeCryptLibrary();
|
||||
|
||||
// Release of the string library
|
||||
FreeStringLibrary();
|
||||
|
||||
// Release of thread pool
|
||||
FreeThreading();
|
||||
|
||||
// Release of crypt library
|
||||
FreeCryptLibrary();
|
||||
|
||||
if (IsTrackingEnabled())
|
||||
{
|
||||
// Show the kernel status
|
||||
|
Loading…
Reference in New Issue
Block a user