mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 03:34:39 +02:00
Fix resource leak
This commit is contained in:
@@ -624,9 +624,10 @@ WOLFSSL_OCSP_CERTID* wolfSSL_OCSP_cert_to_id(
|
|||||||
if (certStatus)
|
if (certStatus)
|
||||||
XFREE(certStatus, NULL, DYNAMIC_TYPE_OPENSSL);
|
XFREE(certStatus, NULL, DYNAMIC_TYPE_OPENSSL);
|
||||||
|
|
||||||
return NULL;
|
certId = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (certId != NULL) {
|
||||||
XMEMSET(certId, 0, sizeof(WOLFSSL_OCSP_CERTID));
|
XMEMSET(certId, 0, sizeof(WOLFSSL_OCSP_CERTID));
|
||||||
XMEMSET(certStatus, 0, sizeof(CertStatus));
|
XMEMSET(certStatus, 0, sizeof(CertStatus));
|
||||||
|
|
||||||
@@ -646,6 +647,7 @@ WOLFSSL_OCSP_CERTID* wolfSSL_OCSP_cert_to_id(
|
|||||||
certId->status->serialSz = cert.serialSz;
|
certId->status->serialSz = cert.serialSz;
|
||||||
}
|
}
|
||||||
FreeDecodedCert(&cert);
|
FreeDecodedCert(&cert);
|
||||||
|
}
|
||||||
|
|
||||||
wolfSSL_CertManagerFree(cm);
|
wolfSSL_CertManagerFree(cm);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user