summaryrefslogtreecommitdiffstats
path: root/ssl/s23_clnt.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-03-06 14:37:17 +0000
committerMatt Caswell <matt@openssl.org>2015-03-23 15:23:11 +0000
commit69f682374868ba2b19a8aeada496bf03dbb037cf (patch)
tree1c7717928dc7eecd832f2c864ff19c63af708ffc /ssl/s23_clnt.c
parent4bcdb4a6019e57b3de077b17940e18befe745531 (diff)
Fix missing return value checks
Ensure that all functions have their return values checked where appropriate. This covers all functions defined and called from within libssl. Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'ssl/s23_clnt.c')
-rw-r--r--ssl/s23_clnt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ssl/s23_clnt.c b/ssl/s23_clnt.c
index e04d3af9f6..21a32bce70 100644
--- a/ssl/s23_clnt.c
+++ b/ssl/s23_clnt.c
@@ -157,8 +157,10 @@ int ssl23_connect(SSL *s)
cb = s->ctx->info_callback;
s->in_handshake++;
- if (!SSL_in_init(s) || SSL_in_before(s))
- SSL_clear(s);
+ if (!SSL_in_init(s) || SSL_in_before(s)) {
+ if(!SSL_clear(s))
+ return -1;
+ }
for (;;) {
state = s->state;