mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2026-04-20 05:49:26 +03:00
Mayaqua/Network.c: fix double free crash in GetCipherList()
SSL_free() also frees the associated context. https://github.com/openssl/openssl/blob/d6c3c1896cf3c0d69bc27da923d63f8130b13ca0/ssl/ssl_lib.c#L1209 From https://www.openssl.org/docs/man1.1.1/man3/SSL_free.html: "SSL_free() also calls the free()ing procedures for indirectly affected items, if applicable: the buffering BIO, the read and write BIOs, cipher lists specially created for this ssl, the SSL_SESSION. Do not explicitly free these indirectly freed up items before or after calling SSL_free(), as trying to free things twice may lead to program failure."
This commit is contained in:
@@ -16507,7 +16507,6 @@ TOKEN_LIST *GetCipherList()
|
||||
}
|
||||
|
||||
sk_SSL_CIPHER_free(sk);
|
||||
FreeSSLCtx(ctx);
|
||||
SSL_free(ssl);
|
||||
|
||||
return ciphers;
|
||||
|
||||
Reference in New Issue
Block a user