From: Matt Caswell Date: Mon, 9 Nov 2015 15:31:27 +0000 (+0000) Subject: Remove redundant check from SSL_shutdown X-Git-Tag: OpenSSL_1_1_0-pre1~296 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3457e7a087a643cb65d67d9d72ec5983a02f5dfe;p=oweals%2Fopenssl.git Remove redundant check from SSL_shutdown The SSL object was being deref'd and then there was a later redundant check to see if it is NULL. We assume all SSL_foo functions pass a non NULL SSL object and do not check it. Reviewed-by: Tim Hudson --- diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 0674cb44af..ec852569b1 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -990,7 +990,7 @@ int SSL_shutdown(SSL *s) return -1; } - if ((s != NULL) && !SSL_in_init(s)) + if (!SSL_in_init(s)) return (s->method->ssl_shutdown(s)); else return (1);