mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-22 17:39:53 +03:00
Mayaqua/Network.c: fix double free crash in GetCipherList()
SSL_free() also frees the associated context.
d6c3c1896c/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:
parent
e939f887c4
commit
09ee19e72b
@ -16507,7 +16507,6 @@ TOKEN_LIST *GetCipherList()
|
||||
}
|
||||
|
||||
sk_SSL_CIPHER_free(sk);
|
||||
FreeSSLCtx(ctx);
|
||||
SSL_free(ssl);
|
||||
|
||||
return ciphers;
|
||||
|
Loading…
Reference in New Issue
Block a user