mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
move location of X509 free
This commit is contained in:
@ -8555,10 +8555,6 @@ int CopyDecodedToX509(WOLFSSL_X509* x509, DecodedCert* dCert)
|
||||
x509->pkCurveOID = dCert->pkCurveOID;
|
||||
#endif /* HAVE_ECC */
|
||||
|
||||
if (ret != 0) {
|
||||
wolfSSL_X509_free(x509);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -8862,6 +8858,9 @@ static int DoVerifyCallback(WOLFSSL* ssl, int ret, ProcPeerCertArgs* args)
|
||||
if (CopyDecodedToX509(x509, args->dCert) == 0) {
|
||||
store->current_cert = x509;
|
||||
}
|
||||
else {
|
||||
FreeX509(x509);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef SESSION_CERTS
|
||||
|
Reference in New Issue
Block a user