mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +00:00
SCT validation: fix small memory leak (public keys were not freed)
This commit is contained in:
parent
0107ad6c31
commit
e1d42ec99c
1 changed files with 3 additions and 0 deletions
|
@ -695,12 +695,15 @@ function sct_verify%(cert: opaque of x509, logid: string, log_key: string, signa
|
|||
success = EVP_DigestVerifyFinal(mdctx, (unsigned char*) signature->Bytes(), signature->Len());
|
||||
#endif
|
||||
EVP_MD_CTX_destroy(mdctx);
|
||||
EVP_PKEY_free(key);
|
||||
|
||||
return new Val(success, TYPE_BOOL);
|
||||
|
||||
sct_verify_err:
|
||||
if (mdctx)
|
||||
EVP_MD_CTX_destroy(mdctx);
|
||||
if (key)
|
||||
EVP_PKEY_free(key);
|
||||
cerr << errstr << endl;
|
||||
reporter->Error("%s", errstr.c_str());
|
||||
return new Val(0, TYPE_BOOL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue