1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-25 19:09:52 +03:00

Fixed memory leak in OpenSSL deinitialization function

This commit is contained in:
vvd 2019-02-27 15:45:31 +03:00 committed by Davide Beatrici
parent e750ace40a
commit 372e8aa031
2 changed files with 8 additions and 3 deletions

View File

@ -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
}

View File

@ -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