1
0
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:
Davide Beatrici 2019-01-10 22:56:13 +01:00
parent e939f887c4
commit 09ee19e72b

View File

@ -16507,7 +16507,6 @@ TOKEN_LIST *GetCipherList()
}
sk_SSL_CIPHER_free(sk);
FreeSSLCtx(ctx);
SSL_free(ssl);
return ciphers;