aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-08-16 10:58:22 (GMT)
committerKaren Arutyunov <karen@codesynthesis.com>2019-08-16 10:58:22 (GMT)
commit84c5c58b420ada15505b3e35b0bd1718567c6da7 (patch)
tree3e8a315b97e342ab86ae85d6330d8a21478644f4
parent28357fa1c3b657e50c2a3e6b1481c1bb9669b221 (diff)
Fix memory leak in pkcs11 agent
-rw-r--r--openssl/agent/pkcs11/private-key.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/openssl/agent/pkcs11/private-key.cxx b/openssl/agent/pkcs11/private-key.cxx
index 1fc4b8c..d9dd4b6 100644
--- a/openssl/agent/pkcs11/private-key.cxx
+++ b/openssl/agent/pkcs11/private-key.cxx
@@ -22,7 +22,10 @@ namespace openssl
close_session (CK_SESSION_HANDLE* p)
{
if (p != nullptr)
+ {
api ()->C_CloseSession (*p);
+ delete p;
+ }
}
private_key::