提交 7c3908dd 编写于 作者: D Dr. Stephen Henson

PR: 2073

Submitted by: Tomas Mraz <tmraz@redhat.com>
Approved by: steve@openssl.org

Don't access freed SSL_CTX in SSL_free().
上级 34775923
...@@ -556,7 +556,6 @@ void SSL_free(SSL *s) ...@@ -556,7 +556,6 @@ void SSL_free(SSL *s)
if (s->cert != NULL) ssl_cert_free(s->cert); if (s->cert != NULL) ssl_cert_free(s->cert);
/* Free up if allocated */ /* Free up if allocated */
if (s->ctx) SSL_CTX_free(s->ctx);
#ifndef OPENSSL_NO_TLSEXT #ifndef OPENSSL_NO_TLSEXT
if (s->tlsext_hostname) if (s->tlsext_hostname)
OPENSSL_free(s->tlsext_hostname); OPENSSL_free(s->tlsext_hostname);
...@@ -580,6 +579,8 @@ void SSL_free(SSL *s) ...@@ -580,6 +579,8 @@ void SSL_free(SSL *s)
if (s->method != NULL) s->method->ssl_free(s); if (s->method != NULL) s->method->ssl_free(s);
if (s->ctx) SSL_CTX_free(s->ctx);
#ifndef OPENSSL_NO_KRB5 #ifndef OPENSSL_NO_KRB5
if (s->kssl_ctx != NULL) if (s->kssl_ctx != NULL)
kssl_ctx_free(s->kssl_ctx); kssl_ctx_free(s->kssl_ctx);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册