summaryrefslogtreecommitdiffstats
path: root/crypto/evp/p_lib.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2010-11-30 19:37:21 +0000
committerDr. Stephen Henson <steve@openssl.org>2010-11-30 19:37:21 +0000
commit09c1dc850c9f91d41fa2ccfaae59212e32ade4c6 (patch)
tree7f9bbc735e5a0dd9ddac9fb118b9a5f8c166043f /crypto/evp/p_lib.c
parent4585fd073433c81ad2da603a9bfa68b861441f75 (diff)
PR: 2385
Submitted by: Stefan Birrer <stefan.birrer@adnovum.ch> Reviewed by: steve Zero key->pkey.ptr after it is freed so the structure can be reused.
Diffstat (limited to 'crypto/evp/p_lib.c')
-rw-r--r--crypto/evp/p_lib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/evp/p_lib.c b/crypto/evp/p_lib.c
index 1916c61699..e26ccd0d08 100644
--- a/crypto/evp/p_lib.c
+++ b/crypto/evp/p_lib.c
@@ -411,7 +411,10 @@ void EVP_PKEY_free(EVP_PKEY *x)
static void EVP_PKEY_free_it(EVP_PKEY *x)
{
if (x->ameth && x->ameth->pkey_free)
+ {
x->ameth->pkey_free(x);
+ x->pkey.ptr = NULL;
+ }
#ifndef OPENSSL_NO_ENGINE
if (x->engine)
{