mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
Resource leak fix.
This commit is contained in:
@ -43820,8 +43820,10 @@ int wolfSSL_X509_check_host(X509 *x, const char *chk, size_t chklen,
|
|||||||
|
|
||||||
InitDecodedCert(&dCert, x->derCert->buffer, x->derCert->length, NULL);
|
InitDecodedCert(&dCert, x->derCert->buffer, x->derCert->length, NULL);
|
||||||
ret = ParseCertRelative(&dCert, CERT_TYPE, 0, NULL);
|
ret = ParseCertRelative(&dCert, CERT_TYPE, 0, NULL);
|
||||||
if (ret != 0)
|
if (ret != 0) {
|
||||||
|
FreeDecodedCert(&dCert);
|
||||||
return WOLFSSL_FAILURE;
|
return WOLFSSL_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
ret = CheckHostName(&dCert, (char *)chk, chklen);
|
ret = CheckHostName(&dCert, (char *)chk, chklen);
|
||||||
FreeDecodedCert(&dCert);
|
FreeDecodedCert(&dCert);
|
||||||
|
Reference in New Issue
Block a user