mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 03:34:39 +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;
|
x509->pkCurveOID = dCert->pkCurveOID;
|
||||||
#endif /* HAVE_ECC */
|
#endif /* HAVE_ECC */
|
||||||
|
|
||||||
if (ret != 0) {
|
|
||||||
wolfSSL_X509_free(x509);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8862,6 +8858,9 @@ static int DoVerifyCallback(WOLFSSL* ssl, int ret, ProcPeerCertArgs* args)
|
|||||||
if (CopyDecodedToX509(x509, args->dCert) == 0) {
|
if (CopyDecodedToX509(x509, args->dCert) == 0) {
|
||||||
store->current_cert = x509;
|
store->current_cert = x509;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
FreeX509(x509);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef SESSION_CERTS
|
#ifdef SESSION_CERTS
|
||||||
|
Reference in New Issue
Block a user