mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-23 01:49:53 +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 <stdarg.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <openssl/crypto.h>
|
||||||
#include <openssl/ssl.h>
|
#include <openssl/ssl.h>
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
@ -3684,6 +3685,10 @@ void FreeOpenSSLThreadState()
|
|||||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||||
CRYPTO_cleanup_all_ex_data();
|
CRYPTO_cleanup_all_ex_data();
|
||||||
ERR_remove_thread_state(NULL);
|
ERR_remove_thread_state(NULL);
|
||||||
|
#else
|
||||||
|
#ifndef LIBRESSL_VERSION_NUMBER
|
||||||
|
OPENSSL_thread_stop();
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -566,15 +566,15 @@ void FreeMayaqua()
|
|||||||
// Release of real-time clock
|
// Release of real-time clock
|
||||||
FreeTick64();
|
FreeTick64();
|
||||||
|
|
||||||
// Release of crypt library
|
|
||||||
FreeCryptLibrary();
|
|
||||||
|
|
||||||
// Release of the string library
|
// Release of the string library
|
||||||
FreeStringLibrary();
|
FreeStringLibrary();
|
||||||
|
|
||||||
// Release of thread pool
|
// Release of thread pool
|
||||||
FreeThreading();
|
FreeThreading();
|
||||||
|
|
||||||
|
// Release of crypt library
|
||||||
|
FreeCryptLibrary();
|
||||||
|
|
||||||
if (IsTrackingEnabled())
|
if (IsTrackingEnabled())
|
||||||
{
|
{
|
||||||
// Show the kernel status
|
// Show the kernel status
|
||||||
|
Loading…
Reference in New Issue
Block a user