aboutsummaryrefslogtreecommitdiffstats
path: root/ssl/ssl_sess.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/ssl_sess.c
parent4bcdb4a6019e57b3de077b17940e18befe745531 (diff)
downloadopenssl-69f682374868ba2b19a8aeada496bf03dbb037cf.tar.gz
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/ssl_sess.c')
-rw-r--r--ssl/ssl_sess.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c
index cf019c8346..22d2e661b9 100644
--- a/ssl/ssl_sess.c
+++ b/ssl/ssl_sess.c
@@ -510,12 +510,14 @@ int ssl_get_prev_session(SSL *s, unsigned char *session_id, int len,
*/
if (!
(s->session_ctx->session_cache_mode &
- SSL_SESS_CACHE_NO_INTERNAL_STORE))
+ SSL_SESS_CACHE_NO_INTERNAL_STORE)) {
/*
* The following should not return 1, otherwise, things are
* very strange
*/
- SSL_CTX_add_session(s->session_ctx, ret);
+ if(SSL_CTX_add_session(s->session_ctx, ret))
+ goto err;
+ }
}
}