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> (cherry picked from commit 3e7bd2ce0b16f8611298175d6dc7cb35ee06ea6d)
This commit is contained in:
parent
3a9328e3f7
commit
a5b63f8073
@ -2983,7 +2983,7 @@ int ssl3_new(SSL *s)
|
||||
|
||||
void ssl3_free(SSL *s)
|
||||
{
|
||||
if (s == NULL)
|
||||
if (s == NULL || s->s3 == NULL)
|
||||
return;
|
||||
|
||||
#ifdef TLSEXT_TYPE_opaque_prf_input
|
||||
|
Loading…
Reference in New Issue
Block a user