Remove redundant check from tls1_get_curvelist
authorMatt Caswell <matt@openssl.org>
Mon, 9 Nov 2015 16:37:33 +0000 (16:37 +0000)
committerMatt Caswell <matt@openssl.org>
Mon, 9 Nov 2015 23:10:31 +0000 (23:10 +0000)
commit822d265cedd98a0dbf48b123a3a24f8528bb5842
tree5979d82c193717adc2474228e2591f6799749112
parent903738ac63e60c10552741e2d6de9753c67e0ff3
Remove redundant check from tls1_get_curvelist

The function tls1_get_curvelist() has an explicit check to see if s->cert
is NULL or not. However the check appears *after* calling the tls1_suiteb
macro which derefs s->cert. In reality s->cert can never be NULL because
it is created in SSL_new(). If the malloc fails then the SSL_new call fails
and no SSL object is created.

Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit 6329b6092b28b656be8a1e4a8363d2e3bcc32053)

Conflicts:
ssl/t1_lib.c
ssl/t1_lib.c