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>
diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c index cf019c8..22d2e66 100644 --- a/ssl/ssl_sess.c +++ b/ssl/ssl_sess.c
@@ -510,12 +510,14 @@ */ 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; + } } }