forked from wolfSSL/wolfssl
scan-build fixes
This commit is contained in:
@@ -8555,6 +8555,10 @@ int CopyDecodedToX509(WOLFSSL_X509* x509, DecodedCert* dCert)
|
||||
x509->pkCurveOID = dCert->pkCurveOID;
|
||||
#endif /* HAVE_ECC */
|
||||
|
||||
if (ret != 0) {
|
||||
wolfSSL_X509_free(x509);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -9366,6 +9370,7 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
|
||||
if (args->dCert == NULL) {
|
||||
ERROR_OUT(MEMORY_E, exit_ppc);
|
||||
}
|
||||
XMEMSET(args->dCert, 0, sizeof(DecodedCert));
|
||||
#endif
|
||||
|
||||
/* Advance state and proceed */
|
||||
|
@@ -11120,12 +11120,14 @@ int wc_PKCS7_DecodeEncryptedData(PKCS7* pkcs7, byte* in, word32 inSz,
|
||||
}
|
||||
|
||||
/* decrypt encryptedContent */
|
||||
ret = wc_PKCS7_DecryptContent(encOID, pkcs7->encryptionKey,
|
||||
if (ret == 0) {
|
||||
ret = wc_PKCS7_DecryptContent(encOID, pkcs7->encryptionKey,
|
||||
pkcs7->encryptionKeySz, tmpIv, expBlockSz,
|
||||
NULL, 0, NULL, 0, encryptedContent,
|
||||
encryptedContentSz, encryptedContent);
|
||||
if (ret != 0) {
|
||||
XFREE(encryptedContent, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
|
||||
if (ret != 0) {
|
||||
XFREE(encryptedContent, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
|
||||
}
|
||||
}
|
||||
|
||||
if (ret == 0) {
|
||||
|
Reference in New Issue
Block a user