mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 19:24:42 +02:00
Merge pull request #8935 from philljj/fix_coverity
coverity: prune dead code in ssl_sess.c.
This commit is contained in:
@@ -5176,11 +5176,6 @@ int wolfSSL_add0_chain_cert(WOLFSSL* ssl, WOLFSSL_X509* x509)
|
||||
/* Push X509 object onto stack to be freed. */
|
||||
ret = wolfSSL_sk_X509_push(ssl->ourCertChain, x509) > 0
|
||||
? WOLFSSL_SUCCESS : WOLFSSL_FAILURE;
|
||||
if (ret != 1) {
|
||||
/* Free it now on error. */
|
||||
wolfSSL_X509_free(x509);
|
||||
x509 = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
return WS_RC(ret);
|
||||
|
@@ -1178,9 +1178,6 @@ int wolfSSL_GetSessionFromCache(WOLFSSL* ssl, WOLFSSL_SESSION* output)
|
||||
byte preallocNonceUsed = 0;
|
||||
#endif /* WOLFSSL_TLS13 */
|
||||
byte tmpBufSet = 0;
|
||||
#endif
|
||||
#if defined(SESSION_CERTS) && defined(OPENSSL_EXTRA)
|
||||
WOLFSSL_X509* peer = NULL;
|
||||
#endif
|
||||
byte bogusID[ID_LEN];
|
||||
byte bogusIDSz = 0;
|
||||
@@ -1447,13 +1444,6 @@ int wolfSSL_GetSessionFromCache(WOLFSSL* ssl, WOLFSSL_SESSION* output)
|
||||
XFREE(preallocNonce, output->heap, DYNAMIC_TYPE_SESSION_TICK);
|
||||
#endif /* WOLFSSL_TLS13 && WOLFSSL_TICKET_NONCE_MALLOC && FIPS_VERSION_GE(5,3)*/
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(SESSION_CERTS) && defined(OPENSSL_EXTRA)
|
||||
if (peer != NULL) {
|
||||
wolfSSL_X509_free(peer);
|
||||
peer = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
return error;
|
||||
|
Reference in New Issue
Block a user