Skip to content

Commit

Permalink
Fix a memory leak in src/crypto/CHIPCryptoPALOpenSSL.cpp (#15682)
Browse files Browse the repository at this point in the history
  • Loading branch information
vivien-apple authored Mar 2, 2022
1 parent c3a34eb commit 6f75dd7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/crypto/CHIPCryptoPALOpenSSL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,11 @@ CHIP_ERROR VerifyCertificateSigningRequest(const uint8_t * csr, size_t csr_lengt
X509_REQ_free(x509_req);
}

if (ec_key != nullptr)
{
EC_KEY_free(ec_key);
}

_logSSLError();
return error;
}
Expand Down

0 comments on commit 6f75dd7

Please sign in to comment.