提交 a60c151a 编写于 作者: P Pascal Cuoq 提交者: Kurt Roeckx

ssl3_free(): Return if it wasn't created

If somewhere in SSL_new() there is a memory allocation failure, ssl3_free() can
get called with s->s3 still being NULL.

Patch also provided by Willy Tarreau <wtarreau@haproxy.com>
Signed-off-by: NKurt Roeckx <kurt@roeckx.be>
Reviewed-by: NViktor Dukhovni <openssl-users@dukhovni.org>
上级 00f5263b
...@@ -3880,7 +3880,7 @@ int ssl3_new(SSL *s) ...@@ -3880,7 +3880,7 @@ int ssl3_new(SSL *s)
void ssl3_free(SSL *s) void ssl3_free(SSL *s)
{ {
if (s == NULL) if (s == NULL || s->s3 == NULL)
return; return;
ssl3_cleanup_key_block(s); ssl3_cleanup_key_block(s);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册