forked from wolfSSL/wolfssl
Fix resource leak
This commit is contained in:
@ -624,9 +624,10 @@ WOLFSSL_OCSP_CERTID* wolfSSL_OCSP_cert_to_id(
|
||||
if (certStatus)
|
||||
XFREE(certStatus, NULL, DYNAMIC_TYPE_OPENSSL);
|
||||
|
||||
return NULL;
|
||||
certId = NULL;
|
||||
}
|
||||
|
||||
if (certId != NULL) {
|
||||
XMEMSET(certId, 0, sizeof(WOLFSSL_OCSP_CERTID));
|
||||
XMEMSET(certStatus, 0, sizeof(CertStatus));
|
||||
|
||||
@ -646,6 +647,7 @@ WOLFSSL_OCSP_CERTID* wolfSSL_OCSP_cert_to_id(
|
||||
certId->status->serialSz = cert.serialSz;
|
||||
}
|
||||
FreeDecodedCert(&cert);
|
||||
}
|
||||
|
||||
wolfSSL_CertManagerFree(cm);
|
||||
|
||||
|
Reference in New Issue
Block a user