mirror of
https://github.com/openssl/openssl.git
synced 2024-11-21 01:15:20 +08:00
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: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Viktor Dukhovni <openssl-users@dukhovni.org>
This commit is contained in:
parent
00f5263b78
commit
a60c151a7d
@ -3880,7 +3880,7 @@ int ssl3_new(SSL *s)
|
||||
|
||||
void ssl3_free(SSL *s)
|
||||
{
|
||||
if (s == NULL)
|
||||
if (s == NULL || s->s3 == NULL)
|
||||
return;
|
||||
|
||||
ssl3_cleanup_key_block(s);
|
||||
|
Loading…
Reference in New Issue
Block a user