Skip to content

Commit

Permalink
Fix memory leak on OCSP_Response
Browse files Browse the repository at this point in the history
  • Loading branch information
rzikm authored and github-actions committed Jan 6, 2024
1 parent 8db980c commit 5c2e93c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ X509* CryptoNative_SslGetPeerCertificate(SSL* ssl)
long len = SSL_get_tlsext_status_ocsp_resp(ssl, &data);
X509* cert = SSL_get1_peer_certificate(ssl);

if (len > 0 && cert != NULL)
if (len > 0 && cert != NULL && !X509_get_ex_data(cert, g_x509_ocsp_index))
{
OCSP_RESPONSE* ocspResp = d2i_OCSP_RESPONSE(NULL, &data, len);

Expand Down

0 comments on commit 5c2e93c

Please sign in to comment.