ssl3_free(): Return if it wasn't created
authorPascal Cuoq <cuoq@trust-in-soft.com>
Sun, 22 Nov 2015 23:13:15 +0000 (00:13 +0100)
committerKurt Roeckx <kurt@roeckx.be>
Tue, 24 Nov 2015 20:56:33 +0000 (21:56 +0100)
commita5b63f80736862809a0f76ce22f7c0cc8163d6ae
tree29d44181dc930c244cb28a369d9b6f80dc4f1443
parent3a9328e3f7adfb0e5ccfb5375c98f4ef304f8554
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)
ssl/s3_lib.c